/* =========================================================
   日序 DAYMARK — visitor access request
   ========================================================= */
:root {
  --ink: #1c2923;
  --ink-soft: #3c4b44;
  --muted: #7d8881;
  --muted-2: #9aa39d;
  --paper: #f3f0e7;
  --card: #fffdf8;
  --card-soft: #f8f4ea;
  --line: #e5dfd0;
  --line-strong: #d5cdbb;
  --forest: #173a31;
  --forest-deep: #102b24;
  --forest-soft: #245244;
  --cream: #f2e8d5;
  --gold: #c6a269;
  --terracotta: #bf6047;
  --danger: #b54b40;
  --serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", "SimSun", Georgia, serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", "Cascadia Code", "Roboto Mono", Consolas, monospace;
  --ease: cubic-bezier(.22, .8, .28, 1);
}
* { box-sizing: border-box; }
html { min-height: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 999;
  opacity: .16;
  pointer-events: none;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.18'/%3E%3C/svg%3E");
}
button, input, textarea { font: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; }
input, textarea { outline: none; }
[hidden] { display: none !important; }
::selection { background: var(--forest); color: var(--cream); }
:where(button, input, textarea):focus-visible { outline: 2px solid rgba(23,58,49,.34); outline-offset: 2px; }

.access-shell {
  display: grid;
  grid-template-columns: minmax(480px, 1.05fr) minmax(420px, .95fr);
  min-height: 100vh;
}
.access-aside {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: clamp(28px, 4vw, 54px);
  overflow: hidden;
  color: var(--cream);
  background:
    radial-gradient(circle at 80% 16%, rgba(201, 167, 108, .15), transparent 31%),
    radial-gradient(circle at 17% 82%, rgba(100, 145, 120, .13), transparent 35%),
    linear-gradient(145deg, #1c493d 0%, #173a31 48%, #0f2922 100%);
}
.access-aside::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .1;
  background-image:
    linear-gradient(rgba(255,255,255,.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.16) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, transparent 4%, #000 58%, transparent 100%);
  pointer-events: none;
}
.access-aside::after {
  content: "";
  position: absolute;
  width: 510px;
  height: 510px;
  right: -255px;
  top: 48%;
  border: 1px solid rgba(242,232,213,.1);
  border-radius: 50%;
  box-shadow: 0 0 0 70px rgba(242,232,213,.018), 0 0 0 140px rgba(242,232,213,.012);
  pointer-events: none;
}
.access-brand, .access-mobile-brand { position: relative; z-index: 2; display: flex; align-items: center; gap: 12px; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--cream);
  background: rgba(242,232,213,.08);
  border-radius: 13px;
  box-shadow: inset 0 0 0 1px rgba(242,232,213,.18);
  flex: 0 0 auto;
}
.brand-mark svg { width: 26px; height: 26px; }
.access-brand strong, .access-mobile-brand strong {
  display: block;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: .16em;
  line-height: 1.15;
}
.access-brand span:not(.brand-mark), .access-mobile-brand span:not(.brand-mark) {
  display: block;
  margin-top: 3px;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .32em;
  opacity: .56;
}
.access-copy { position: relative; z-index: 2; margin-top: clamp(54px, 9vh, 106px); max-width: 560px; }
.eyebrow {
  margin: 0 0 7px;
  color: rgba(242,232,213,.52);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .18em;
  line-height: 1.4;
  text-transform: uppercase;
}
.access-copy h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(42px, 4.4vw, 66px);
  font-weight: 600;
  letter-spacing: -.035em;
  line-height: 1.23;
}
.access-copy h1 span { color: var(--gold); }
.access-copy > p:last-child {
  margin: 25px 0 0;
  max-width: 365px;
  color: rgba(242,232,213,.62);
  font-size: 13.5px;
  line-height: 1.9;
}
.door-art {
  position: relative;
  z-index: 2;
  width: min(420px, 82%);
  margin: clamp(26px, 4.5vh, 48px) auto 0 3vw;
  min-height: 305px;
  flex: 1;
}
.door-orbit { position: absolute; border: 1px solid rgba(242,232,213,.12); border-radius: 50%; pointer-events: none; }
.door-orbit--one { width: 430px; height: 430px; left: -52px; top: -66px; }
.door-orbit--two { width: 545px; height: 545px; left: -108px; top: -124px; opacity: .55; }
.door-card {
  position: relative;
  width: 352px;
  padding: 20px 22px 17px;
  color: var(--ink);
  background: #faf6ec;
  border-radius: 16px;
  box-shadow: 0 34px 76px rgba(4,18,13,.38), inset 0 0 0 1px rgba(255,255,255,.7);
  transform: rotate(-2.6deg);
  animation: doorFloat 8s ease-in-out infinite;
}
@keyframes doorFloat {
  0%, 100% { transform: rotate(-2.6deg) translateY(0); }
  50% { transform: rotate(-1.8deg) translateY(-7px); }
}
.door-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: .17em;
}
.door-live { display: inline-flex; align-items: center; gap: 4px; color: #9d6c33; letter-spacing: .03em; }
.door-live i { width: 5px; height: 5px; border-radius: 50%; background: var(--gold); animation: pulse 2s infinite; }
.door-person { display: flex; align-items: center; gap: 10px; margin-top: 17px; }
.door-avatar { display: grid; place-items: center; width: 38px; height: 38px; color: var(--forest); background: #e9dcc4; border-radius: 50%; font-family: var(--serif); font-size: 16px; }
.door-person b { display: block; font-size: 12px; }
.door-person small { display: block; margin-top: 1px; color: var(--muted); font-size: 8.5px; }
.door-rule { height: 1px; margin: 15px 0 9px; background: var(--line); }
.door-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 5px 0; font-size: 9px; }
.door-row span { color: var(--muted); }
.door-row strong { font-weight: 500; text-align: right; }
.door-lock {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 12px;
  padding: 9px 10px;
  background: #e5eee7;
  border: 1px solid rgba(77,128,100,.12);
  border-radius: 8px;
}
.lock-glyph { display: grid; place-items: center; width: 25px; height: 25px; color: var(--forest); background: rgba(77,128,100,.12); border-radius: 7px; font-size: 14px; }
.door-lock b { display: block; color: #355e47; font-size: 8.5px; }
.door-lock small { display: block; margin-top: 1px; color: #66816f; font-size: 7.5px; }
.access-aside-foot {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: auto 0 0;
  padding-top: 26px;
  color: rgba(242,232,213,.42);
  font-size: 9px;
  letter-spacing: .06em;
}
.access-aside-foot span { width: 5px; height: 5px; border-radius: 50%; background: #88b697; box-shadow: 0 0 0 3px rgba(136,182,151,.13); }

.access-main {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 44px clamp(28px, 5vw, 82px);
  background: radial-gradient(circle at 100% 0%, rgba(210,185,138,.14), transparent 30%), var(--paper);
}
.access-box { width: 100%; max-width: 405px; }
.access-mobile-brand { display: none; margin-bottom: 42px; }
.access-mobile-brand .brand-mark { color: var(--forest); background: var(--cream); box-shadow: inset 0 0 0 1px rgba(23,58,49,.08); }
.access-mobile-brand strong { color: var(--ink); }
.access-view h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(34px, 3vw, 43px);
  font-weight: 600;
  letter-spacing: -.04em;
  line-height: 1.28;
}
.access-box .eyebrow { color: var(--muted); font-size: 9px; }
.access-desc { margin: 16px 0 26px; color: var(--muted); font-size: 12.5px; line-height: 1.85; }
.access-desc b { color: var(--ink-soft); font-weight: 600; }
.access-form { display: grid; gap: 15px; }
.input-field { display: grid; gap: 7px; }
.input-field > span { color: var(--ink-soft); font-size: 11px; font-weight: 600; letter-spacing: .04em; }
.input-field > span b { color: var(--terracotta); font-weight: 500; }
.input-field > span em { color: var(--muted-2); font-style: normal; font-weight: 400; }
.input-field input, .input-field textarea {
  width: 100%;
  min-height: 47px;
  padding: 11px 13px;
  color: var(--ink);
  background: rgba(255,253,248,.7);
  border: 1px solid var(--line);
  border-radius: 10px;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
.input-field textarea { min-height: 88px; line-height: 1.65; resize: vertical; }
.input-field input::placeholder, .input-field textarea::placeholder { color: #aab1ac; }
.input-field input:focus, .input-field textarea:focus {
  background: var(--card);
  border-color: rgba(23,58,49,.55);
  box-shadow: 0 0 0 3px rgba(23,58,49,.08);
}
.input-field input:focus-visible, .input-field textarea:focus-visible { outline: none; }
.form-error { min-height: 0; margin: 0; color: var(--danger); font-size: 11px; line-height: 1.5; }
.form-error:not(:empty) { min-height: 18px; }
.access-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  min-height: 50px;
  color: var(--cream);
  background: var(--forest);
  border: 1px solid var(--forest);
  border-radius: 11px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .02em;
  box-shadow: 0 9px 20px rgba(23,58,49,.15);
  transition: background .18s, transform .18s, box-shadow .18s;
}
.access-submit svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.access-submit:hover { background: var(--forest-soft); box-shadow: 0 12px 25px rgba(23,58,49,.2); }
.access-submit:active { transform: translateY(1px); }
.access-submit[disabled] { opacity: .55; pointer-events: none; }
.access-submit--quiet { margin-top: 2px; min-height: 46px; }
.access-footnote { margin: 20px 0 0; color: var(--muted-2); font-size: 9.5px; line-height: 1.7; }
.access-state { text-align: left; }
.state-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin-bottom: 22px;
  border-radius: 50%;
}
.state-icon svg { position: relative; z-index: 1; width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.state-icon--wait { color: #8a672f; background: #f3eadb; }
.state-icon--denied { color: var(--danger); background: rgba(181,75,64,.09); }
.pulse-ring { position: absolute; inset: 0; border: 1px solid rgba(198,162,105,.4); border-radius: 50%; animation: ringPulse 2.4s ease-out infinite; }
@keyframes ringPulse { 0% { transform: scale(.9); opacity: .8; } 80%, 100% { transform: scale(1.35); opacity: 0; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
.pending-card {
  display: grid;
  gap: 0;
  margin-top: 22px;
  padding: 4px 14px;
  background: rgba(255,253,248,.72);
  border: 1px solid var(--line);
  border-radius: 11px;
}
.pending-card > div { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 10px 0; border-bottom: 1px solid rgba(229,223,208,.7); }
.pending-card > div:last-child { border-bottom: 0; }
.pending-card span { color: var(--muted); font-size: 9.5px; }
.pending-card strong { color: var(--ink-soft); font-size: 10.5px; font-weight: 500; word-break: break-all; }
.pending-status { justify-content: flex-start !important; gap: 6px !important; }
.pending-status span:last-child { color: #8a672f; font-size: 9.5px; }
.mini-pulse { width: 5px; height: 5px; border-radius: 50%; background: var(--gold); animation: pulse 1.8s infinite; }
.text-button {
  display: block;
  margin: 16px auto 0;
  padding: 4px 8px;
  color: var(--muted);
  font-size: 9.5px;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(125,136,129,.35);
}
.text-button:hover { color: var(--forest); }
.loading-mark { display: flex; gap: 5px; margin-bottom: 16px; }
.loading-mark span { width: 7px; height: 7px; border-radius: 50%; background: var(--forest); opacity: .35; animation: loadingBounce 1.16s infinite ease-in-out; }
.loading-mark span:nth-child(2) { animation-delay: .16s; }
.loading-mark span:nth-child(3) { animation-delay: .32s; }
@keyframes loadingBounce { 0%, 80%, 100% { transform: translateY(0); opacity: .3; } 40% { transform: translateY(-6px); opacity: .85; } }
#accessLoadingView > p { margin: 0; color: var(--muted); font-size: 12px; }
.access-trust {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 39px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 8.5px;
  letter-spacing: .02em;
}
.access-trust span { display: inline-flex; align-items: center; gap: 4px; }
.access-trust svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.access-box .shake { animation: shake .36s cubic-bezier(.36,.07,.19,.97); }
@keyframes shake {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(3px); }
  30%, 50%, 70% { transform: translateX(-5px); }
  40%, 60% { transform: translateX(5px); }
}

/* Account forms */
.form-grid--two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.auth-tabs {
  display: flex;
  gap: 3px;
  margin: 0 0 20px;
  padding: 3px;
  background: rgba(255,253,248,.62);
  border: 1px solid var(--line);
  border-radius: 9px;
}
.auth-tab {
  flex: 1;
  min-height: 33px;
  color: var(--muted);
  border-radius: 6px;
  font-size: 10.5px;
}
.auth-tab.is-active { color: var(--ink); background: var(--card); box-shadow: 0 1px 3px rgba(31,40,34,.08); }
.auth-panel { display: block; }
.access-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.6;
  cursor: pointer;
}
.access-check input { position: absolute; opacity: 0; pointer-events: none; }
.custom-check {
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  margin-top: 1px;
  color: transparent;
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  flex: 0 0 auto;
}
.custom-check .icon { width: 10px; height: 10px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.access-check input:checked + .custom-check { color: var(--cream); background: var(--forest); border-color: var(--forest); }
.access-submit[disabled] { opacity: .48; pointer-events: none; }
.kit-card {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 15px;
  padding: 11px 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.kit-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: var(--forest);
  background: var(--cream);
  border-radius: 8px;
  font-family: var(--serif);
  font-size: 13px;
  flex: 0 0 auto;
}
.kit-card > div { min-width: 0; flex: 1; }
.kit-card b { display: block; overflow: hidden; font-size: 10.5px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.kit-card small { display: block; margin-top: 2px; color: var(--muted); font-size: 8.5px; }
.kit-confirm { margin: 0 0 15px; }
.input-field input[type="file"] { padding: 9px; font-size: 10px; color: var(--muted); }
.input-field input[type="file"]::file-selector-button {
  margin-right: 9px;
  padding: 6px 9px;
  color: var(--forest);
  background: var(--cream);
  border: 0;
  border-radius: 6px;
  font-family: var(--sans);
  font-size: 9.5px;
  cursor: pointer;
}
.mini-lock { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.access-footnote { display: flex; align-items: flex-start; gap: 5px; }
.access-footnote .mini-lock { margin-top: 2px; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

@media (max-width: 900px) {
  .access-shell { display: block; }
  .access-aside { display: none; }
  .access-main { min-height: 100vh; padding: 32px 22px 40px; align-items: start; }
  .access-box { max-width: 430px; margin: 0 auto; padding-top: 4vh; }
  .access-mobile-brand { display: flex; }
}
@media (max-width: 480px) {
  .access-box { padding-top: 2vh; }
  .access-view h2 { font-size: 31px; }
  .access-desc { font-size: 12px; }
  .access-trust { gap: 11px; margin-top: 32px; }
  .form-grid--two { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
