/* Layout rules for header, screens, work panels, and footer. */

.app-header {
  padding: 24px 20px 8px;
}

.app-header-inner {
  width: min(760px, calc(100% - 40px));
  margin: 0 auto;
  display: grid;
  gap: 20px;
  padding: 24px 26px;
  background: var(--app-surface);
  border: 1px solid var(--app-border-soft);
  border-radius: var(--app-radius-xl);
}

.app-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  min-width: 0;
}

.app-logo {
  width: clamp(58px, 7vw, 96px);
  height: auto;
  flex: 0 0 auto;
}

.app-brand-text {
  min-width: 0;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.app-brand h1 {
  max-width: 920px;
  margin: 0 0 12px;
  color: #fbbf24;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.04em;
  font-weight: 850;
  white-space: normal;
  text-wrap: balance;
}

.app-subtitle {
  margin: 0;
  color: var(--app-muted-strong);
  font-size: clamp(17px, 2vw, 24px);
  font-weight: 650;
  line-height: 1.25;
  text-align: center;
}

.app-intro {
  max-width: 820px;
  margin: 0 auto;
  color: var(--app-muted);
  font-size: 14px;
  text-align: center;
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.header-actions #openColorThemePickerButton {
  position: relative;
  z-index: 120;
}

body.modal-open .header-actions #openColorThemePickerButton {
  position: fixed;
  top: max(56px, calc((100vh - min(84vh, 760px)) / 2 + 26px));
  right: max(18px, calc((100vw - min(760px, calc(100vw - 36px))) / 2 - 126px));
  transform: none;
  z-index: 100;
}

.app-main {
  width: min(760px, calc(100% - 40px));
  margin: 0 auto 28px;
}

.screen {
  width: 100%;
}

.screen-card,
.work-panel {
  width: min(760px, 100%);
  background: var(--app-surface);
  border: 1px solid var(--app-border-soft);
  border-radius: var(--app-radius);
}

.screen-card {
  margin: 8px auto 24px;
  padding: 24px;
  text-align: center;
  background: #050505;
  border-color: var(--app-border-soft);
}

.screen-card h2,
.work-panel h2 {
  margin: 0 0 8px;
  color: var(--app-text);
  font-size: 22px;
  letter-spacing: -0.02em;
  text-align: center;
}

.screen-card h2 {
  color: var(--app-text);
  font-weight: 850;
}

.screen-card p {
  max-width: 620px;
  margin: 0 auto;
  color: var(--app-muted-strong);
  font-size: 14px;
  text-align: center;
}

.work-panel p {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  color: var(--app-muted);
  font-size: 14px;
  text-align: center;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.screen-toolbar {
  display: flex;
  justify-content: center;
  margin: 18px 0 12px;
}

.work-panel {
  margin: 0 auto 28px;
  padding: 20px;
  text-align: center;
}

.panel-header {
  display: grid;
  justify-items: center;
  gap: 14px;
  margin-bottom: 16px;
  text-align: center;
}

.panel-header > div {
  display: grid;
  justify-items: center;
  text-align: center;
}

.structure-section {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--app-border-soft);
  text-align: center;
}

.structure-section h3,
.file-status-card h3,
.folder-tree-preview-card h3,
.archive-result-card h3 {
  margin: 0 0 8px;
  color: var(--app-text);
  font-size: 15px;
  text-align: center;
}

.action-row,
.archive-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}

.file-status-card,
.folder-tree-preview-card,
.archive-result-card {
  margin-top: 14px;
  text-align: center;
}

.app-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 25;
  padding: 10px 18px 12px;
  background: #ffffff;
  border-top: 1px solid #e5e7eb;
  color: #111827;
  text-align: center;
  font-size: 12px;
}

.app-footer p {
  margin: 0;
}

.app-footer a {
  margin-left: 10px;
  color: #111827;
}

.copyrighted-badge {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  line-height: 0;
}

.copyrighted-badge img {
  display: block;
  width: 82px;
  height: 25px;
}
