* {
  box-sizing: border-box;
}
.appearance-page {
  min-height: 100vh;
}
.appearance-header {
  height: 76px !important;
  padding: 0 3vw !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.appearance-header .brand {
  font-size: 18px;
  gap: 12px;
  white-space: nowrap;
}
.appearance-header .brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 11px;
}
.appearance-header nav {
  display: flex;
  align-items: center;
  gap: 6px;
}
.appearance-header nav a {
  padding: 11px 17px;
  border-radius: 11px;
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}
.appearance-account {
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
}
.appearance-main {
  max-width: 1150px;
  margin: 0 auto;
  padding: 42px 28px 70px;
}
.appearance-main h1 {
  font-size: 36px;
  line-height: 1.2;
  margin: 8px 0 24px;
  letter-spacing: -1px;
}
.appearance-main h2 {
  font-size: 24px;
  margin: 0 0 8px;
}
.appearance-main .eyebrow {
  font-size: 12px;
  color: var(--theme-muted);
  letter-spacing: 1.5px;
}
.settings-tabs {
  display: flex;
  gap: 28px;
  border-bottom: 1px solid var(--theme-border);
  margin-bottom: 28px;
  overflow: auto;
}
.settings-tabs a {
  padding: 0 0 15px;
  text-decoration: none;
  white-space: nowrap;
  font-weight: 600;
  color: var(--theme-muted);
  font-size: 14px;
}
.settings-tabs a[aria-current] {
  color: var(--theme-accent);
  border-bottom: 3px solid var(--theme-accent);
}
.appearance-panel {
  padding: 32px;
  background: white;
  border: 1px solid var(--theme-border);
  border-radius: 18px;
  box-shadow: 0 5px 22px #142f5810;
}
.appearance-intro {
  margin: 0 0 8px;
  font-size: 17px;
}
.appearance-panel .muted {
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 28px;
}
.appearance-panel fieldset {
  padding: 0;
  border: 0;
  margin: 0;
  min-width: 0;
}
.preset-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.preset-card {
  display: block;
  position: relative;
  border: 2px solid var(--theme-border);
  border-radius: 14px;
  padding: 10px 10px 20px;
  margin: 0;
  cursor: pointer;
  background: #fff;
  transition: border-color 0.15s;
}
.preset-card:has(input:checked) {
  border-color: var(--theme-accent);
  box-shadow: 0 0 0 2px var(--theme-soft);
}
.preset-card:has(input:focus-visible) {
  outline: 3px solid var(--theme-focus);
  outline-offset: 3px;
}
.preset-card input {
  position: absolute;
  bottom: 62px;
  left: 17px;
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--theme-accent);
}
.preset-card .preset-name {
  display: block;
  margin: 18px 8px 8px 32px;
  font-size: 16px;
  font-weight: 700;
}
.preset-card .preset-description {
  display: block;
  margin: 0 8px;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--theme-muted);
  min-height: 42px;
}
.preset-preview {
  height: 175px;
  border-radius: 8px;
  overflow: hidden;
  background: #f3f6fb;
  border: 1px solid #dae3f1;
  pointer-events: none;
}
.preview-top {
  height: 30px;
  background: #88ade4;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 9px;
}
.preview-dot {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  background: #fff;
}
.preview-tab {
  height: 10px;
  width: 35px;
  border-radius: 3px;
  background: #ffffffb3;
}
.preview-tab:nth-child(3) {
  width: 25px;
}
.preview-heading {
  font-size: 11px;
  font-weight: 650;
  margin: 12px 10px 9px;
  color: #172b48;
}
.preview-body {
  display: flex;
  gap: 8px;
  margin: 0 10px;
}
.preview-info {
  width: 30%;
  height: 86px;
  border-radius: 5px;
  background: #fff;
  border: 1px solid #dae3f1;
}
.preview-lines {
  flex: 1;
}
.preview-line {
  height: 37px;
  border-radius: 5px;
  background: #fff;
  border: 1px solid #dae3f1;
  margin-bottom: 8px;
  padding: 9px;
}
.preview-line::after {
  content: "";
  display: block;
  width: 75%;
  height: 5px;
  background: #dce7f7;
  border-radius: 3px;
}
.preset-sky-blue .preset-preview {
  background: #f0faff;
}
.preset-sky-blue .preview-top {
  background: linear-gradient(110deg, #0759cc, #0874a2);
}
.preset-deep-blue .preset-preview {
  background: #f2f6fd;
}
.preset-deep-blue .preview-top {
  background: linear-gradient(110deg, #122b61, #2f62b6);
}
.preset-badge {
  display: block;
  text-align: right;
  height: 22px;
  font-size: 11px;
  font-weight: 700;
  color: var(--theme-accent);
  padding: 5px 5px 0;
}
.appearance-actions {
  display: flex;
  gap: 12px;
  margin-top: 28px;
}
.appearance-actions button,
.recovery-actions button {
  font-size: 14px;
  border-radius: 9px;
  padding: 12px 20px;
  margin: 0;
}
.appearance-status {
  font-size: 14px;
  line-height: 1.6;
  min-height: 23px;
  margin: 18px 0 0;
  color: var(--theme-muted);
}
.recovery-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 12px;
}
.recovery-actions a {
  color: var(--theme-accent);
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.appearance-page button:disabled {
  opacity: 0.45;
  cursor: default;
}
.appearance-page fieldset:disabled .preset-card {
  cursor: default;
}
@media (max-width: 800px) {
  .appearance-header {
    height: auto !important;
    padding: 16px 22px !important;
    flex-wrap: wrap;
    gap: 14px;
  }
  .appearance-header nav {
    order: 3;
    width: 100%;
    overflow: auto;
  }
  .appearance-header nav a {
    padding: 9px 12px;
  }
  .appearance-main {
    padding: 28px 18px;
  }
  .appearance-panel {
    padding: 22px;
  }
  .preset-grid {
    grid-template-columns: 1fr;
  }
  .preset-preview {
    height: 155px;
  }
  .preset-card input {
    bottom: 53px;
  }
  .preset-card .preset-description {
    min-height: 0;
  }
  .preset-card .preset-name {
    margin-top: 12px;
  }
  .appearance-main h1 {
    font-size: 30px;
  }
  .settings-tabs {
    gap: 22px;
  }
  .appearance-actions {
    flex-wrap: wrap;
  }
}

.preset-title {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 16px 8px 8px;
}
.preset-card .preset-title input {
  position: static;
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  margin: 0;
}
.preset-card .preset-title .preset-name {
  margin: 0;
}
