/* ===== TopBar ===== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: rgba(10, 10, 10, .78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.topbar .brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  text-decoration: none;
}
.topbar .brand .zh {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 5px;
  color: var(--fg);
}
.topbar .brand .en {
  font-family: var(--garamond);
  font-style: italic;
  font-size: 12px;
  letter-spacing: 2px;
  color: rgba(218, 218, 218, .5);
}
.topbar .tel {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 1px;
  color: rgba(218, 218, 218, .55);
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  transition: color .2s;
}
.topbar .tel:hover {
  color: var(--accent);
}
.icon-btn {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: grid;
  place-items: center;
  color: var(--muted);
  border-radius: 4px;
  transition: color .2s, background .2s;
}
.icon-btn:hover {
  color: var(--fg);
  background: rgba(232, 184, 109, .08);
}
.page-title {
  flex: 1;
  text-align: center;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: 6px;
  color: var(--fg);
  line-height: 1.2;
}
.page-title .en {
  display: block;
  font-family: var(--garamond);
  font-style: italic;
  font-size: 11px;
  letter-spacing: 3px;
  color: rgba(218, 218, 218, .5);
  font-weight: 400;
  margin-top: 2px;
}
.text-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: rgba(218, 218, 218, .7);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 2px;
  transition: color .2s;
}
.text-link:hover {
  color: var(--accent);
}
.text-link.ghost {
  min-width: 44px;
  justify-content: center;
}
.top-link {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 44px;
  min-height: 44px;
  padding: 0 8px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 2px;
  cursor: pointer;
  text-decoration: none;
  transition: color .2s;
}
.top-link:hover {
  color: var(--fg);
}
.spacer {
  width: 44px;
  flex: 0 0 44px;
}

/* ===== Layout ===== */
.column {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin: 0 auto;
  padding: 28px 16px 140px;
}
.section-gap {
  margin-top: 20px;
}

/* ===== Card ===== */
.will-card,
.section-card {
  background: linear-gradient(135deg, rgba(232, 184, 109, .06), transparent 55%), var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .55);
  padding: clamp(22px, 5vw, 40px);
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: 3px;
  color: var(--fg);
}
.card-actions {
  display: flex;
  gap: 8px;
}
.card-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  letter-spacing: 3px;
  color: rgba(218, 218, 218, .55);
}
.card-label::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(232, 184, 109, .5);
}

/* ===== Button ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 30px;
  border-radius: 4px;
  font-size: 15px;
  letter-spacing: 3px;
  font-weight: 300;
  transition: background .2s, color .2s, border-color .2s, box-shadow .2s;
}
.btn.primary {
  background: var(--accent);
  color: var(--bg);
  font-weight: 400;
  box-shadow: 0 0 30px rgba(232, 184, 109, .25);
}
.btn.primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 0 36px rgba(255, 220, 160, .35);
}
.btn.primary:disabled {
  opacity: .4;
  cursor: not-allowed;
  box-shadow: none;
}
.btn.ghost {
  border: 1px solid var(--border);
  color: var(--muted);
}
.btn.ghost:hover {
  border-color: var(--accent);
  color: var(--fg);
  background: rgba(232, 184, 109, .08);
}
.btn.ghost:disabled {
  opacity: .4;
  cursor: not-allowed;
}
.btn.loading {
  pointer-events: none;
  animation: breath 1.6s ease-in-out infinite;
}
.btn.lg {
  min-height: 50px;
  padding: 0 40px;
  font-size: 15px;
  letter-spacing: 4px;
}
.btn.submit {
  width: 100%;
  margin-top: 32px;
}
@keyframes breath {
  0%, 100% { box-shadow: 0 0 22px rgba(232, 184, 109, .2); }
  50% { box-shadow: 0 0 44px rgba(255, 220, 160, .45); }
}

/* ===== ActionBar ===== */
.action-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(10, 10, 10, .86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, .08);
}

/* ===== Field ===== */
.field {
  margin-top: 24px;
}
.field.flat {
  margin-top: 0;
}
.field label {
  display: block;
  margin-bottom: 2px;
  font-size: 12px;
  letter-spacing: 3px;
  color: rgba(218, 218, 218, .55);
}
.control {
  display: flex;
  align-items: center;
  gap: 6px;
}
.control > input {
  flex: 1;
  min-width: 0;
  font-size: 16px;
  letter-spacing: 1px;
  padding: 10px 2px;
  min-height: 44px;
}
input.mono {
  font-family: var(--mono);
  letter-spacing: 2px;
}
.underline {
  display: block;
  height: 1px;
  background: var(--border);
  transition: background .25s, box-shadow .25s;
}
.field:focus-within .underline,
.sign-block:focus-within .underline {
  background: var(--accent);
  box-shadow: 0 0 18px rgba(232, 184, 109, .35);
}
.field.invalid .underline {
  background: var(--error);
  box-shadow: 0 0 18px rgba(232, 144, 122, .35);
}
.field.ok .underline {
  background: var(--accent);
  box-shadow: 0 0 14px rgba(232, 184, 109, .3);
}
.field-msg {
  min-height: 20px;
  margin-top: 4px;
  font-size: 12px;
  letter-spacing: 1px;
  line-height: 1.6;
  color: var(--error);
  opacity: 0;
  transition: opacity .2s;
}
.field.invalid .field-msg,
.field.ok .field-msg {
  opacity: 1;
}
.field.ok .field-msg {
  color: var(--accent);
}
.hint {
  margin-top: 10px;
  font-size: 13px;
  color: rgba(218, 218, 218, .6);
  letter-spacing: 1px;
}
.field-head {
  font-size: 14px;
  letter-spacing: 2px;
  color: var(--fg);
  margin-bottom: 6px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}
.field-head .req {
  color: var(--error);
  margin-left: 2px;
  font-weight: 400;
}

/* ===== DividerLabel ===== */
.divider-label {
  display: flex;
  align-items: center;
  gap: 12px;
}
.divider-label .line {
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, .1);
}
.divider-label .label {
  font-size: 12px;
  letter-spacing: 3px;
  color: rgba(218, 218, 218, .55);
  white-space: nowrap;
}

/* ===== Seal ===== */
.seal {
  flex: 0 0 auto;
  writing-mode: vertical-rl;
  text-orientation: upright;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 5px;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 3px;
  padding: 8px 5px;
  position: relative;
  box-shadow: 0 0 30px rgba(232, 184, 109, .2), inset 0 0 12px rgba(232, 184, 109, .12);
  user-select: none;
}
.seal::after {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1px solid rgba(232, 184, 109, .5);
  border-radius: 2px;
}
@keyframes sealGlow {
  0%, 100% { box-shadow: 0 0 26px rgba(232, 184, 109, .18), inset 0 0 12px rgba(232, 184, 109, .12); }
  50% { box-shadow: 0 0 46px rgba(255, 220, 160, .34), inset 0 0 16px rgba(232, 184, 109, .2); }
}

/* ===== Toast ===== */
.toast {
  position: fixed;
  left: 50%;
  transform: translate(-50%, 12px);
  bottom: var(--toast-bottom, calc(88px + env(safe-area-inset-bottom)));
  z-index: 70;
  max-width: calc(100vw - 40px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 1px;
  padding: 10px 18px;
  text-align: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s, transform .25s, visibility .25s;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .5);
}
.toast.show {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}
.toast.error {
  color: var(--error);
  border-color: rgba(232, 144, 122, .5);
}
body.toast-slim {
  --toast-bottom: calc(28px + env(safe-area-inset-bottom));
}
body.toast-low {
  --toast-bottom: calc(40px + env(safe-area-inset-bottom));
}

/* ===== Modal ===== */
.modal,
.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, .62);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s, visibility .25s;
  padding: 20px;
}
.modal.show,
.overlay.show {
  opacity: 1;
  visibility: visible;
}
.modal-card {
  width: min(420px, 100%);
  background: linear-gradient(135deg, rgba(232, 184, 109, .06), transparent 55%), var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 32px 28px;
  text-align: center;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .6);
}
.modal-card h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: 4px;
  color: var(--fg);
}
.modal-card p {
  margin-top: 12px;
  font-size: 14px;
  color: rgba(218, 218, 218, .65);
  letter-spacing: 1px;
  line-height: 1.7;
}
.modal-btns {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}

/* ===== Tooltip ===== */
.tip-wrap {
  position: relative;
  display: inline-flex;
  margin-top: 1px;
}
.tip-btn {
  width: 44px;
  height: 44px;
  margin: -11px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: rgba(218, 218, 218, .55);
  transition: color .2s;
}
.tip-btn:hover,
.tip-btn:focus-visible {
  color: var(--accent);
}
.tip {
  position: absolute;
  bottom: calc(100% + 2px);
  right: -9px;
  z-index: 8;
  width: max-content;
  max-width: min(260px, calc(100vw - 64px));
  background: linear-gradient(135deg, rgba(232, 184, 109, .06), transparent 55%), var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.7;
  letter-spacing: .5px;
  color: var(--muted);
  text-align: left;
  box-shadow: 0 16px 44px rgba(0, 0, 0, .55);
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity .2s, transform .2s, visibility .2s;
  pointer-events: none;
}
.tip::after {
  content: "";
  position: absolute;
  top: 100%;
  right: 7px;
  margin-top: -5px;
  width: 8px;
  height: 8px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  transform: rotate(45deg);
}
.tip-wrap.open .tip {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

/* ===== Checklist / Radio rows ===== */
.check-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 44px;
  cursor: pointer;
}
.check-row input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.check-box {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 3px;
  border: 1px solid rgba(200, 170, 130, .55);
  border-radius: 3px;
  background: rgba(255, 255, 255, .02);
  display: grid;
  place-items: center;
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.check-box svg {
  opacity: 0;
  transform: scale(.5);
  transition: opacity .15s, transform .18s;
}
.check-row:hover .check-box {
  border-color: var(--accent);
}
.check-row input:checked ~ .check-box {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 16px rgba(232, 184, 109, .28);
}
.check-row input:checked ~ .check-box svg {
  opacity: 1;
  transform: scale(1);
}
.check-row input:focus-visible ~ .check-box {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.check-label {
  padding-top: 1px;
  font-size: 14px;
  letter-spacing: 1px;
  color: var(--muted);
  line-height: 1.7;
}
.radio-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 44px;
  flex: 1 1 auto;
  min-width: 0;
  cursor: pointer;
  padding: 6px 0;
}
.radio-row input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.radio-box {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 3px;
  border-radius: 50%;
  border: 1px solid rgba(200, 170, 130, .55);
  background: rgba(255, 255, 255, .02);
  display: grid;
  place-items: center;
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.radio-box::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0;
  transform: scale(.4);
  transition: opacity .15s, transform .18s;
}
.radio-row:hover .radio-box {
  border-color: var(--accent);
}
.radio-row input:checked ~ .radio-box {
  border-color: var(--accent);
  box-shadow: 0 0 16px rgba(232, 184, 109, .28);
}
.radio-row input:checked ~ .radio-box::after {
  opacity: 1;
  transform: scale(1);
}
.radio-row input:focus-visible ~ .radio-box {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.radio-label {
  padding-top: 1px;
  font-size: 14px;
  letter-spacing: 1px;
  color: var(--muted);
  line-height: 1.7;
  flex: 1;
  min-width: 0;
}
.radio-row input:checked ~ .radio-label {
  color: var(--fg);
}

/* ===== OptCard (radio card) ===== */
.opt-list {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.opt-card {
  position: relative;
  display: block;
  cursor: pointer;
  background: linear-gradient(135deg, rgba(232, 184, 109, .05), transparent 55%), var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 20px 22px;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.opt-card:hover {
  border-color: var(--accent);
}
.opt-card.sel {
  border-color: var(--accent);
  box-shadow: 0 0 30px rgba(232, 184, 109, .22);
}
.opt-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.oc-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
}
.oc-dot {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 3px;
  border-radius: 50%;
  border: 1px solid rgba(200, 170, 130, .55);
  background: rgba(255, 255, 255, .02);
  display: grid;
  place-items: center;
  transition: border-color .2s, box-shadow .2s;
}
.oc-dot::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0;
  transform: scale(.4);
  transition: opacity .15s, transform .18s;
}
.opt-card.sel .oc-dot {
  border-color: var(--accent);
  box-shadow: 0 0 16px rgba(232, 184, 109, .28);
}
.opt-card.sel .oc-dot::after {
  opacity: 1;
  transform: scale(1);
}
.oc-titles {
  flex: 1;
  min-width: 0;
}
.oc-title {
  display: block;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: 2px;
  color: var(--fg);
}
.oc-sub {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  color: rgba(218, 218, 218, .6);
  letter-spacing: 1px;
}
.oc-body {
  margin-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, .08);
  padding-top: 18px;
}
.oc-body.hidden {
  display: none;
}
.form-gap {
  margin-top: 18px;
}
.form-gap:first-child {
  margin-top: 0;
}

/* ===== Chips ===== */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, .02);
  font-size: 13px;
  letter-spacing: 1px;
  color: var(--muted);
}
.chip b {
  font-family: var(--mono);
  color: var(--fg);
  font-weight: 400;
}
.chip .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(232, 184, 109, .6);
}

/* ===== Status dot ===== */
.status-dot {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}
.status-dot.pending {
  box-shadow: 0 0 10px rgba(232, 184, 109, .45);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 8px rgba(232, 184, 109, .4); }
  50% { box-shadow: 0 0 14px rgba(232, 184, 109, .6); }
}

/* ===== Media overlay (image/video preview) ===== */
.overlay {
  z-index: 60;
  background: rgba(10, 10, 10, .92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
}
.overlay-inner {
  position: relative;
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .6);
  cursor: default;
}
.overlay-inner img {
  display: block;
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
}
.overlay-inner video {
  display: block;
  max-width: min(720px, 100%);
  max-height: 85vh;
  border-radius: 4px;
  background: #000;
}
.overlay-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: rgba(10, 10, 10, .7);
  border-radius: 50%;
  color: var(--muted);
  transition: color .2s, background .2s;
}
.overlay-close:hover {
  color: var(--fg);
  background: rgba(10, 10, 10, .9);
}

/* ===== Error panel / loading ===== */
.error-panel {
  position: relative;
  z-index: 1;
  max-width: 480px;
  margin: 80px auto;
  text-align: center;
}
.error-panel .ep-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: 4px;
  color: var(--fg);
}
.error-panel .ep-sub {
  margin-top: 12px;
  font-size: 13px;
  letter-spacing: 1px;
  color: rgba(218, 218, 218, .6);
}
.error-panel .ep-actions {
  margin-top: 28px;
  display: flex;
  justify-content: center;
  gap: 12px;
}
.skeleton {
  min-height: 120px;
  border-radius: 4px;
  background: linear-gradient(135deg, rgba(232, 184, 109, .05), transparent 55%), rgba(255, 255, 255, .02);
}
.hidden {
  display: none !important;
}

/* ===== Footer note ===== */
.page-foot {
  margin-top: 22px;
  text-align: center;
  font-size: 12px;
  letter-spacing: 2px;
  color: rgba(218, 218, 218, .55);
}
.page-foot .tel {
  font-family: var(--mono);
  letter-spacing: 1px;
  color: rgba(218, 218, 218, .55);
}

/* ===== Eye + code btn (auth) ===== */
.eye {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  color: rgba(218, 218, 218, .6);
  transition: color .2s, background .2s;
}
.eye:hover {
  color: var(--fg);
  background: rgba(232, 184, 109, .08);
}
.code-btn {
  flex: 0 0 auto;
  white-space: nowrap;
  min-height: 44px;
  padding: 0 14px;
  margin: 2px 0;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 13px;
  letter-spacing: 2px;
  color: var(--accent);
  font-family: var(--mono);
  transition: border-color .2s, background .2s, color .2s;
}
.code-btn:hover:not(:disabled) {
  border-color: var(--accent);
  background: rgba(232, 184, 109, .08);
}
.code-btn:disabled {
  color: rgba(218, 218, 218, .45);
  border-color: rgba(255, 255, 255, .12);
  cursor: default;
}

/* ===== Motion presets ===== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.fade-up {
  animation: fadeUp .32s ease;
}
@media (prefers-reduced-motion: reduce) {
  .btn.loading,
  .seal,
  .status-dot.pending,
  .toast,
  .modal,
  .overlay {
    animation: none;
    transition: none;
  }
}
