:root {
  color-scheme: light;
  --paper: #f7f6f0;
  --surface: #fffefa;
  --ink: #1b3028;
  --muted: #4a6056;
  --line: #d7dfd7;
  --accent: #244739;
  font: 16px/1.6 "Instrument Sans", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--paper); color: var(--ink); }
a { color: inherit; text-underline-offset: .22em; }
button, input { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #547f6d; outline-offset: 3px; }
.skip { position: absolute; transform: translateY(-150%); background: var(--surface); padding: .6rem; }
.skip:focus { transform: none; z-index: 1; }
.topbar {
  max-width: 1220px; margin: auto; padding: 1.15rem clamp(1rem, 4vw, 3rem);
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
}
.brand { display: inline-flex; align-items: center; gap: .6rem; font-size: 1.13rem; font-weight: 750; text-decoration: none; }
.brand img { object-fit: contain; }
.back { font-size: .87rem; font-weight: 650; color: var(--muted); }
.account {
  display: grid; grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr);
  max-width: 1120px; margin: clamp(1rem, 6vh, 5rem) auto 4rem;
  width: calc(100% - clamp(2rem, 8vw, 6rem)); min-height: 34rem;
  border: 1px solid var(--line); background: var(--surface); border-radius: 24px;
  overflow: clip; box-shadow: 0 18px 70px #263e2510;
}
.intro {
  background: #19392f; color: #fffdf3;
  padding: clamp(1.6rem, 4.5vw, 4rem); display: flex; flex-direction: column; justify-content: space-between;
  gap: clamp(2.5rem, 9vw, 6rem);
}
.staff {
  display: flex; align-items: center; justify-content: space-around;
  min-height: 6rem; color: #d8e6d6; padding-inline: .5rem;
  background: repeating-linear-gradient(to bottom, #b8d5be60 0 1px, transparent 1px 15px) center / 100% 61px no-repeat;
}
.staff span:first-child { font: 4.8rem/1 "STIX Two Text", "Times New Roman", serif; }
.staff span:not(:first-child) { font: 2rem/1 Georgia, serif; }
.staff span:nth-child(3) { transform: translateY(-14px); }
.staff span:last-child { transform: translateY(-29px); }
.eyebrow { font-size: .74rem; font-weight: 740; letter-spacing: .18em; color: #c8dbca; margin: 0; }
h1, h2, h3, p { margin: 0; }
h1 { margin-top: .55rem; font-size: clamp(2.25rem, 5vw, 4rem); line-height: 1.12; letter-spacing: -.05em; }
#subtitle { color: #dce8df; margin-top: 1rem; max-width: 22rem; }
.details { padding: clamp(1.15rem, 4.5vw, 3.4rem); min-width: 0; }
.tabs { display: flex; flex-wrap: wrap; gap: .2rem .55rem; border-bottom: 1px solid var(--line); margin-bottom: 2rem; }
.tabs a { padding: .55rem .36rem; font-size: .83rem; font-weight: 650; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; }
.tabs a[aria-current] { border-color: var(--accent); color: var(--ink); }
.tabs a:hover, .text-link:hover { color: #126549; }
h2 { font-size: clamp(1.28rem, 3vw, 1.65rem); line-height: 1.24; letter-spacing: -.035em; }
h3 { font-size: 1rem; line-height: 1.4; }
.details section > p, #privacy p, #delete-dialog p { margin-top: .7rem; }
.muted, .fine { color: var(--muted); }
.fine { font-size: .85rem; }
.primary, .secondary {
  border: 1px solid transparent; display: inline-flex; align-items: center; justify-content: center;
  gap: .75rem; min-height: 44px; padding: .62rem 1rem; border-radius: 9px; font-weight: 690;
}
.primary { background: var(--accent); color: white; }
.primary:hover:enabled { background: #163529; }
button:disabled { opacity: .63; cursor: default; }
.secondary { background: transparent; border-color: var(--line); color: var(--ink); }
.secondary:hover { background: #ebf1eb; }
.danger { color: #922b27; }
#guest form { margin: 1.35rem 0 .75rem; }
[data-google] { width: min(100%, 22rem); justify-content: space-between; }
.text-link { display: inline-block; font-size: .9rem; font-weight: 650; margin-top: 1.4rem; }
.notice { border-left: 3px solid #708c7b; background: #edf2eb; padding: .65rem .85rem; margin-bottom: 1.15rem; border-radius: 4px; font-size: .9rem; }
.facts { margin: 1rem 0; }
.facts div { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .15rem 1rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.facts dt, #profile-form label { font-weight: 650; }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.field { display: flex; gap: .5rem; margin: .45rem 0 1.2rem; }
.field input { min-width: 0; flex: 1; border: 1px solid #9cad9f; border-radius: 9px; padding: .6rem .75rem; color: var(--ink); background: white; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .85rem; }
#privacy-controls { margin-top: 1.35rem; }
.plan-list { display: grid; gap: .65rem; margin-top: 1.05rem; }
.plan-list article { border: 1px solid var(--line); border-radius: 11px; padding: .8rem 1rem; }
.plan-list article div { display: flex; justify-content: space-between; align-items: center; gap: .4rem; }
.plan-list p { color: var(--muted); font-size: .88rem; margin: .4rem 0 .1rem; }
.plan-list a { font-size: .85rem; font-weight: 700; }
.badge { font-size: .72rem; white-space: nowrap; padding: .16rem .45rem; border-radius: 4px; background: #eeeae0; }
.badge.active { background: #deeddf; }
dialog { padding: 1.5rem; width: min(28rem, calc(100% - 2rem)); border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--ink); }
dialog::backdrop { background: #172f25a3; }
@media (max-width: 720px) {
  .account { grid-template-columns: 1fr; min-height: auto; border-radius: 16px; margin-top: .5rem; }
  .intro { flex-direction: column-reverse; gap: .85rem; }
  .staff { min-height: 3rem; max-width: 15rem; background-size: 100% 41px; background-image: repeating-linear-gradient(to bottom, #b8d5be60 0 1px, transparent 1px 10px); }
  .staff span:first-child { font-size: 3rem; }
  .staff span:not(:first-child) { font-size: 1.3rem; transform: none; }
  .tabs { margin-bottom: 1.35rem; }
}
