:root {
  color-scheme: only dark;
  --bg: #211526; --surface: #302235; --field: #241929; --line: #59465e;
  --text: #fcf6fc; --muted: #d1bfd5; --lime: #c2ff42; --link: #e0b6ef;
  font: 400 100%/1.5 Rubik, system-ui, sans-serif;
  color: var(--text); background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
#app { width: min(100% - 3rem, 75rem); margin: auto; padding-bottom: max(3rem, env(safe-area-inset-bottom)); }
button, input, select { font: inherit; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: var(--link); }
:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(3.4rem,5.7vw,6.2rem); line-height: .98; font-weight: 720; letter-spacing: -.06em; }
h1 em { color: var(--lime); }
h2 { font-size: clamp(1.55rem,2.5vw,2.2rem); line-height: 1.1; letter-spacing: -.045em; font-weight: 630; margin-bottom: 1.1rem; }
.masthead { display: flex; justify-content: space-between; align-items: center; min-height: 76px; border-bottom: 1px solid #4b374f; }
.wordmark { display: inline-flex; align-items: center; }
.wordmark img { width: 156px; height: auto; }
.home-link { color: var(--text); border: 1px solid #715d77; border-radius: 2rem; padding: .58rem 1.15rem; text-decoration: none; font-size: .94rem; }
.home-link:hover { border-color: var(--muted); }
.auth-layout { display: grid; grid-template-columns: 1.22fr 1fr; align-items: stretch; gap: clamp(2rem,5vw,5rem); margin: clamp(2rem,5vw,5rem) 0; }
.intro { isolation: isolate; overflow: hidden; position: relative; background: #332038; border-radius: 1.6rem; padding: clamp(1.6rem,3.7vw,3.8rem); }
.intro::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg,rgba(33,21,38,.94),rgba(33,21,38,.65) 31%,rgba(33,21,38,.04) 70%), url("/_landing/assets/village.webp") 58% 63% / cover; }
.auth-layout .intro { min-height: 32rem; }
.auth-layout h1 em { display: block; }
.intro p { max-width: 23rem; margin-top: 1rem; color: #f2e5f4; font-size: 1.05rem; line-height: 1.5; text-wrap: pretty; }
.auth-panel { align-self: center; min-width: 0; }
.card, .auth-panel { background: var(--surface); border: 1px solid #4b394f; border-radius: 1.5rem; padding: clamp(1.25rem,2.8vw,2.4rem); }
.auth-panel .card { background: transparent; border: 0; padding: 0; }
.tabs { display: flex; padding: .25rem; margin: 0 0 1.75rem; border-radius: 2rem; border: 1px solid var(--line); background: var(--field); }
.tab { flex: 1 1 auto; min-height: 42px; padding: .35rem .45rem; border: 0; border-radius: 2rem; color: var(--muted); background: transparent; font-size: .9rem; font-weight: 520; }
.tab[aria-pressed=true] { background: #553c5c; color: #fffaff; }
label, .cap { display: block; color: var(--muted); font-size: .9rem; font-weight: 500; margin: 1rem 0 .35rem; }
input, select, .sublink { width: 100%; border: 1px solid #79637f; background: var(--field); border-radius: .8rem; padding: .73rem .9rem; min-height: 46px; }
input::placeholder { color: #b5a2bb; }
.btn { display: flex; justify-content: center; align-items: center; width: 100%; min-height: 46px; font-weight: 570; border-radius: 2rem; padding: .69rem .95rem; margin-top: .7rem; text-decoration: none; text-align: center; border: 1px solid #7e6685; background: #3b2b41; color: var(--text); }
.btn:hover, .tab:hover, .dur:hover, .plan:hover { filter: brightness(1.12); }
.btn.primary { background: var(--lime); color: #222217; border-color: var(--lime); margin-top: 1.25rem; }
.btn.ghost { background: transparent; }
.btn:disabled { opacity: .5; cursor: default; }
.divider { display: flex; align-items: center; gap: .75rem; color: var(--muted); margin: .9rem 0; font-size: .87rem; }
.divider::before,.divider::after { content: ""; flex: 1; border-bottom: 1px solid var(--line); }
.account-layout { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; gap: 1.05rem; margin-top: 1.7rem; }
.account-layout .intro { grid-column: 1/-1; padding-block: 2rem; }
.account-layout .intro::before { background: linear-gradient(90deg,#322037 10%,#322037de 43%,#32203712 85%),url("/_landing/assets/village.webp") right 61% / cover; }
.account-layout h1 { font-size: clamp(2.5rem,4.5vw,4.5rem); }
.account-layout h2 { font-size: 1.5rem; }
.account-layout > .center { grid-column: 1/-1; }
.li { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: .68rem 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.li:last-child { border: 0; }
.pill { flex: none; display: inline-block; border-radius: 2rem; font-size: .8rem; font-weight: 550; padding: .22rem .65rem; }
.pill.ok { color: #d5f8ad; background: #38432c; }
.pill.warn { color: #f5d3a5; background: #4d3930; }
.hint,.muted { color: var(--muted); }
.hint { font-size: .93rem; margin-top: .5rem; }
.sublink { margin-top: .8rem; font: .85rem/1.5 ui-monospace,monospace; overflow-wrap: anywhere; user-select: all; }
.link { background: transparent; padding: .3rem; border: 0; text-underline-offset: .2em; text-decoration: underline; color: var(--link); }
.plan, .dur { border: 1px solid var(--line); background: var(--field); border-radius: .85rem; min-height: 44px; padding: .6rem .8rem; }
.plan { display: flex; width: 100%; align-items: baseline; justify-content: space-between; gap: .6rem; margin: .45rem 0; text-align: left; }
.plan.on,.dur.on { border-color: var(--link); background: #47314d; }
.name,.dur .p { font-weight: 600; }
.durs { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .7rem; }
.dur { flex: 1 1 5.5rem; }
.dur span { display: block; }
.center { text-align: center; }
#toast { position: fixed; left: 50%; bottom: max(1rem,env(safe-area-inset-bottom)); transform: translateX(-50%); border: 1px solid #836e87; background: #422d49; border-radius: 1rem; padding: .7rem 1.1rem; opacity: 0; pointer-events: none; text-align: center; max-width: 90%; width: max-content; z-index: 5; }
#toast.show { opacity: 1; }
@media(max-width: 760px) {
  #app { width: min(100% - 1.6rem,36rem); }
  .masthead { min-height: 62px; }
  .wordmark img { width: 130px; }
  .home-link { font-size: .85rem; padding: .42rem .85rem; }
  .auth-layout,.account-layout { grid-template-columns: 1fr; gap: .85rem; margin: 1rem 0; }
  .auth-layout .intro,.account-layout .intro { min-height: 0; padding: 1.35rem 1.15rem; border-radius: 1.1rem; }
  .intro::before,.account-layout .intro::before { background: linear-gradient(90deg,#2e1e33 6%,#2e1e33d9 43%,#2e1e3333 85%),url("/_landing/assets/village.webp") 65% 62% / cover; }
  .intro h1 { font-size: clamp(2.05rem,7.8vw,3rem); }
  .auth-layout h1 em { display: inline; }
  .intro p { max-width: 68%; font-size: .88rem; margin-top: .5rem; }
  .tabs { margin-bottom: 1.2rem; }
  .auth-panel,.card { padding: 1.1rem; border-radius: 1.1rem; }
  .tab { font-size: .85rem; }
  .li { flex-wrap: wrap; gap: .35rem .7rem; }
}
