:root {
  font-family: Inter, 'Segoe UI', Arial, sans-serif;
  color: #1b2b40;
  background: #f6f7f9;
  font-synthesis: none;
  --bg: #f6f7f9;
  --surface: #fff;
  --text: #1b2b40;
  --muted: #596679;
  --border: #e0e5eb;
  --orange: #e84b26;
  --action: #bc391b;
  --soft: #fff0e9;
  --rail: 244px;
  --shadow: 0 12px 40px #1b2b4009;
  color-scheme: light;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
button {
  color: inherit;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 4px;
}
button {
  border: 0;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
p {
  line-height: 1.7;
}
h1,
h2,
h3 {
  letter-spacing: -0.045em;
  line-height: 1.1;
}
h2 {
  font-size: clamp(1.7rem, 2.5vw, 2.25rem);
}
h3 {
  font-size: 1.3rem;
}
::selection {
  background: #ffbf99;
  color: #18283c;
}
.sidebar {
  width: var(--rail);
  position: fixed;
  inset: 0 auto 0 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 30px 22px 16px;
  display: flex;
  flex-direction: column;
  z-index: 20;
}
.brand {
  display: flex;
  gap: 11px;
  align-items: center;
  font-weight: 700;
  letter-spacing: -0.04em;
  font-size: 1.15rem;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 40px;
  background: var(--orange);
  color: white;
  border-radius: 11px;
  font-size: 32px;
  position: relative;
  line-height: 1;
}
.brand-mark span {
  position: absolute;
  right: 5px;
  bottom: 3px;
  color: #1b2b40;
}
.brand small {
  display: block;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  margin-top: 5px;
  color: var(--muted);
}
nav {
  overflow-y: auto;
  scrollbar-width: thin;
  margin-top: 25px;
  flex: 1;
}
.nav-group {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin: 22px 12px 8px;
}
nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  margin: 3px 0;
  border-radius: 7px;
  font-size: 14px;
  color: var(--muted);
  transition:
    background 0.2s,
    color 0.2s;
}
nav a:hover {
  background: var(--bg);
  color: var(--text);
}
nav a.active {
  background: var(--soft);
  color: var(--action);
  font-weight: 650;
}
nav a small {
  margin-left: auto;
  border: 1px solid var(--border);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 12px;
}
.icon {
  font-family: 'Segoe UI Symbol', 'Segoe UI', sans-serif;
  display: inline-grid;
  place-items: center;
  width: 20px;
  font-size: 22px;
  line-height: 1;
}
.sidebar-foot {
  display: flex;
  gap: 9px;
  align-items: center;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  font-size: 12px;
}
.sidebar-foot small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}
.tiny-avatar {
  padding: 10px 8px;
  border-radius: 50%;
  background: #e8edf2;
  font-size: 12px;
  color: #1b2b40;
}
.site-body {
  margin-left: var(--rail);
}
.topbar {
  height: 76px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
}
.breadcrumb {
  font-size: 13px;
  color: var(--muted);
}
.breadcrumb span {
  padding: 0 14px;
  color: #b0bac5;
}
.breadcrumb strong {
  font-weight: 500;
  color: var(--text);
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 12px;
}
.local-time {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.05em;
}
.icon-button {
  background: var(--surface);
  border: 1px solid var(--border);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 19px;
}
.hello-link {
  font-weight: 650;
}
main {
  max-width: 1530px;
  margin: 0 auto;
  padding: 38px 48px 50px;
  min-height: calc(100vh - 155px);
}
main:focus {
  outline: 0;
}
.home-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.eyebrow {
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: 0.13em;
  font-weight: 650;
  color: var(--muted);
  margin-bottom: 10px;
}
.home-top .eyebrow {
  margin: 0;
}
.edition {
  font-size: 12px;
  letter-spacing: 0.11em;
  color: var(--muted);
}
.hero {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 7%;
  align-items: center;
  padding: 50px 0 45px;
}
.welcome {
  font-size: 12px;
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--muted);
}
.welcome span,
.live-dot {
  width: 6px;
  height: 6px;
  display: inline-block;
  border-radius: 50%;
  background: #568a6c;
}
.hero h1 {
  font-size: clamp(3.5rem, 5.5vw, 6.2rem);
  font-weight: 600;
  letter-spacing: -0.068em;
  line-height: 1.015;
  margin: 22px 0;
}
.orange {
  color: var(--orange);
}
.hero em {
  font-family: Georgia, serif;
  font-weight: 400;
  color: var(--orange);
}
.hero-description {
  font-size: 15px;
  max-width: 385px;
  color: var(--muted);
  line-height: 1.8;
}
.hero-description strong {
  font-weight: 600;
  color: var(--text);
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 25px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 13px 18px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  transition:
    transform 0.18s,
    background 0.18s;
  min-height: 44px;
}
.button:hover {
  transform: translateY(-2px);
  border-color: var(--muted);
}
.button.primary {
  background: var(--action);
  border-color: var(--action);
  color: white;
}
.hero-location {
  font-size: 12px;
  color: var(--muted);
  margin-top: 33px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.line {
  height: 12px;
  width: 1px;
  background: var(--border);
  margin: 0 4px;
}
.portrait-wrap {
  position: relative;
  max-width: 420px;
  width: 100%;
  justify-self: end;
  padding: 0 12px 25px;
}
.portrait-label {
  font-size: 12px;
  letter-spacing: 0.16em;
  margin: 0 0 12px 6px;
  color: var(--muted);
}
.portrait {
  border-radius: 7px;
  overflow: hidden;
  background: #e6e9ed;
  border: 1px solid var(--border);
  transform: rotate(2deg);
  position: relative;
  box-shadow: 8px 12px 0 #e5e9ef;
}
.portrait img {
  width: 100%;
  height: 375px;
  object-fit: cover;
  object-position: center 30%;
  display: block;
  filter: saturate(0.72);
}
.portrait-caption {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 15px 18px;
  background: var(--surface);
  font-size: 12px;
  letter-spacing: 0.1em;
}
.portrait-note {
  background: #fae4b5;
  color: #51462f;
  transform: rotate(-7deg);
  position: absolute;
  bottom: 31px;
  left: -35px;
  font-family: Georgia, serif;
  font-style: italic;
  font-size: 17px;
  line-height: 1.4;
  padding: 17px 23px 17px 49px;
  box-shadow: 0 4px 12px #0000000c;
}
.note-star {
  position: absolute;
  left: 15px;
  top: 18px;
  font-size: 27px;
}
.photo-index {
  text-align: right;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.11em;
  margin-top: 27px;
}
.current-strip {
  display: grid;
  grid-template-columns: 0.85fr 1.1fr 1.1fr 1.1fr;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 23px 0;
  background: var(--surface);
  gap: 0;
}
.current-strip > div {
  padding: 0 22px;
  border-left: 1px solid var(--border);
}
.current-strip > div:first-child {
  border: 0;
}
.current-strip .eyebrow {
  font-size: 12px;
  margin-bottom: 7px;
}
.current-strip p:last-child {
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
}
.current-title {
  font-weight: 600;
  font-size: 15px;
}
.current-title .live-dot {
  margin-right: 7px;
}
.muted {
  color: var(--muted);
}
.current-title .muted {
  display: block;
  font-weight: 400;
  font-size: 12px;
  margin-top: 7px;
}
.world-section {
  margin-top: 49px;
}
.section-line {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 22px;
}
.section-line h2 {
  margin: 0;
  font-size: 1.6rem;
}
.text-link {
  font-size: 14px;
  background: none;
  padding: 0;
  color: var(--text);
  font-weight: 600;
}
.world-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.world-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 23px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: transform 0.2s;
  min-width: 0;
}
.world-card:hover {
  transform: translateY(-5px);
}
.journey-card {
  background: #ecf1f8;
}
.arcade-card {
  background: #eeeefb;
}
.memory-card {
  background: #f4efe7;
}
.card-number {
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.world-card > .icon {
  font-size: 35px;
  margin: 25px 0 21px;
  width: 40px;
}
.world-card h3 {
  font-size: 1.4rem;
  letter-spacing: -0.045em;
  margin-bottom: 10px;
}
.world-card p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--muted);
  max-width: 250px;
}
.card-link {
  font-size: 12px;
  border-top: 1px solid #1b2b401a;
  width: 100%;
  padding-top: 15px;
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.card-link b {
  font-size: 20px;
}
.home-bottom {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 43px;
  align-items: center;
}
.home-bottom blockquote {
  margin: 12px 0 14px;
  font-family: Georgia, serif;
  font-size: 1.3rem;
  line-height: 1.5;
  font-style: italic;
  max-width: 400px;
}
.studio-teaser {
  display: flex;
  align-items: center;
  gap: 20px;
  border: 1px dashed #b9c3cf;
  border-radius: 8px;
  padding: 23px;
}
.studio-teaser > .icon,
.studio-teaser > span {
  color: var(--orange);
}
.studio-teaser h3 {
  font-size: 1.1rem;
  margin: 5px 0;
}
.studio-teaser p {
  font-size: 14px;
  color: var(--muted);
  margin: 5px 0;
}
.studio-teaser b {
  margin-left: auto;
  font-size: 24px;
}
footer {
  border-top: 1px solid var(--border);
  padding: 25px 48px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-size: 12px;
  color: var(--muted);
}
.skip {
  position: fixed;
  top: -100px;
  z-index: 100;
  background: var(--text);
  color: var(--surface);
  padding: 15px;
}
.skip:focus {
  top: 10px;
}
.mobile-toggle {
  display: none;
}
.toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 90vw;
  background: var(--text);
  color: var(--surface);
  padding: 15px 24px;
  border-radius: 10px;
  box-shadow: var(--shadow);
  z-index: 100;
  line-height: 1.5;
  font-size: 14px;
}
.loading {
  padding: 80px;
  text-align: center;
  color: var(--muted);
}
.page-heading {
  margin: 15px 0 40px;
}
.page-heading h1 {
  font-size: clamp(2.5rem, 4.5vw, 4.2rem);
  margin: 15px 0;
}
.lead {
  max-width: 660px;
  color: var(--muted);
  font-size: 17px;
}
.empty {
  padding: 64px 24px;
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: 12px;
  background: var(--surface);
  margin: 20px 0;
}
.empty > span {
  font-size: 42px;
  color: var(--orange);
  display: block;
  margin-bottom: 20px;
}
.empty p {
  color: var(--muted);
  max-width: 480px;
  margin: 0 auto;
}
.empty h3 {
  font-size: 1.6rem;
}
.empty .button {
  margin-top: 20px;
}
[data-theme='dark'] {
  --bg: #111b28;
  --surface: #192638;
  --text: #e6edf5;
  --muted: #a8b6c7;
  --border: #2d3b4f;
  --soft: #382821;
  --orange: #ff825d;
  --action: #ff825d;
  color-scheme: dark;
  background: var(--bg);
  color: var(--text);
}
[data-theme='dark'] .world-card {
  background: var(--surface);
}
[data-theme='dark'] .portrait {
  box-shadow: 8px 12px 0 #29374a;
}
[data-theme='dark'] .button.primary {
  color: #172335;
}
[data-theme='dark'] .tiny-avatar {
  background: #2c3c50;
  color: white;
}
@media (min-width: 1550px) {
  .hero {
    gap: 10%;
  }
  .hero h1 {
    font-size: 6.8rem;
  }
  .portrait img {
    height: 440px;
  }
  .portrait-wrap {
    max-width: 470px;
  }
}
@media (max-width: 1180px) {
  :root {
    --rail: 216px;
  }
  .sidebar {
    padding: 24px 15px 15px;
  }
  main {
    padding: 30px;
  }
  .topbar {
    padding: 0 30px;
  }
  .hero {
    gap: 5%;
    padding: 35px 0;
  }
  .hero h1 {
    font-size: 4.1rem;
  }
  .portrait img {
    height: 320px;
  }
  .portrait-note {
    font-size: 14px;
    left: -15px;
  }
  .current-strip > div {
    padding: 0 13px;
  }
  .hero-location {
    flex-wrap: wrap;
  }
  .world-card {
    padding: 18px;
  }
  .edition {
    display: none;
  }
}
@media (max-width: 900px) {
  :root {
    --rail: 190px;
  }
  .hero {
    grid-template-columns: 1fr 1fr;
  }
  .hero h1 {
    font-size: 3.3rem;
  }
  .portrait img {
    height: 290px;
  }
  .hero-description {
    font-size: 14px;
  }
  .actions {
    gap: 8px;
  }
  .button {
    gap: 12px;
  }
  .hero-location {
    font-size: 12px;
  }
  .portrait-note {
    left: -14px;
    font-size: 12px;
    padding: 14px 14px 14px 38px;
  }
  .current-strip {
    grid-template-columns: 1fr 1fr;
    row-gap: 23px;
  }
  .current-strip > div:nth-child(3) {
    border: 0;
  }
  .world-grid {
    grid-template-columns: 1fr;
  }
  .world-card {
    display: grid;
    grid-template-columns: 40px 1fr;
    column-gap: 20px;
  }
  .world-card > .icon {
    grid-row: 2/4;
    margin: 12px 0;
  }
  .world-card h3,
  .world-card p {
    grid-column: 2;
  }
  .card-number,
  .card-link {
    grid-column: 1/-1;
  }
  .world-card p {
    max-width: none;
  }
  .home-bottom {
    grid-template-columns: 1fr;
  }
  .section-line {
    align-items: flex-end;
  }
  .section-line h2 {
    font-size: 1.4rem;
  }
  .section-line .text-link {
    white-space: nowrap;
  }
  footer {
    padding: 24px 30px;
    flex-wrap: wrap;
  }
}
@media (max-width: 700px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: auto;
    width: 100%;
    height: 72px;
    padding: 14px 22px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .brand {
    font-size: 1rem;
  }
  .brand-mark {
    width: 34px;
    height: 35px;
    font-size: 29px;
  }
  .sidebar nav {
    display: none;
  }
  .sidebar-foot {
    display: none;
  }
  .mobile-toggle {
    display: block;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    width: 42px;
    height: 40px;
    font-size: 22px;
  }
  .sidebar.open nav {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    margin: 0;
    padding: 12px 20px 24px;
    max-height: calc(100vh - var(--mobile-header-height));
    max-height: calc(100dvh - var(--mobile-header-height));
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
    box-shadow: 0 10px 20px #0002;
  }
  .sidebar.open nav a {
    padding: 12px;
  }
  .site-body {
    margin: 0;
    padding-top: var(--mobile-header-height);
  }
  .topbar {
    padding: 0 22px;
    height: 54px;
  }
  .top-actions {
    gap: 14px;
  }
  .local-time {
    display: none;
  }
  main {
    padding: 25px 22px 40px;
  }
  .home-top .eyebrow {
    font-size: 12px;
  }
  .hero {
    grid-template-columns: 1fr;
    gap: 34px;
    padding-top: 25px;
  }
  .hero h1 {
    font-size: clamp(3.3rem, 13vw, 5rem);
  }
  .hero-description {
    font-size: 16px;
    max-width: 440px;
  }
  .portrait-wrap {
    max-width: 340px;
    justify-self: center;
    margin-top: 10px;
  }
  .portrait img {
    height: 320px;
  }
  .portrait-note {
    font-size: 16px;
    left: -12px;
    padding-left: 48px;
  }
  .hero-location {
    font-size: 12px;
    margin-top: 25px;
  }
  .current-strip {
    padding: 22px 6px;
  }
  .current-strip > div {
    padding: 0 14px;
  }
  .current-strip p:last-child {
    font-size: 13px;
  }
  .world-section {
    margin-top: 37px;
  }
  .section-line {
    align-items: start;
    flex-direction: column;
    gap: 12px;
  }
  .section-line h2 {
    font-size: 1.7rem;
  }
  .world-card {
    padding: 23px;
  }
  .world-card p {
    font-size: 14px;
  }
  .card-number,
  .card-link {
    font-size: 12px;
  }
  .home-bottom {
    gap: 28px;
  }
  .home-bottom blockquote {
    font-size: 1.5rem;
  }
  footer {
    padding: 25px 22px;
    font-size: 12px;
    gap: 12px;
  }
  footer span:nth-child(2) {
    display: none;
  }
  .eyebrow {
    font-size: 12px;
  }
  .page-heading {
    margin-top: 10px;
  }
  .page-heading h1 {
    font-size: 2.8rem;
  }
  .topbar .breadcrumb {
    font-size: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}
@supports not (overflow: clip) {
  html { overflow-x: hidden; }
}
.site-body, main { min-width: 0; }
.page-heading,
.hero {
  animation: page-enter 240ms ease-out both;
}
@keyframes page-enter {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* iPhone Safari: native page scrolling and no focus-induced input zoom. */
@media (pointer: coarse), (max-width: 700px) {
  html { scroll-behavior: auto; }
  input:not([type='range']):not([type='color']):not([type='checkbox']):not([type='radio']),
  select, textarea { font-size: 16px !important; }
  .page-heading, .hero { animation: none; }
}
@media (max-width: 700px) {
  :root { --mobile-header-height: 104px; }
  html { scroll-padding-top: calc(var(--mobile-header-height) + 16px); }
  main [id], main .activity-stage, main .memory-play, main .memory-invitation,
  main .typing-practice, main .typing-surprise, main .typing-length-setup,
  main .notebook-round, main .date-calendar, main .gear-stage,
  .rental-experience .rental-booking { scroll-margin-top: 0; }
  .activity-menu #activity-choices, .activity-switch-list, .typing-passage,
  .memory-board-window { overscroll-behavior-y: auto; -webkit-overflow-scrolling: touch; }
  dialog { overscroll-behavior-y: contain; -webkit-overflow-scrolling: touch; }
  .card-preview, .post-easy .post-preview { position: static; }
  .memory-duel { top: calc(var(--mobile-header-height) + 8px); }
}
/* A short, calm arrival on each section; navigation itself stays still. */
#main.page-arrive-a { animation:page-arrive-a .28s cubic-bezier(.2,.65,.3,1) both; }
#main.page-arrive-b { animation:page-arrive-b .28s cubic-bezier(.2,.65,.3,1) both; }
@keyframes page-arrive-a { from { opacity:.2; transform:translateY(7px); } to { opacity:1; transform:none; } }
@keyframes page-arrive-b { from { opacity:.2; transform:translateY(7px); } to { opacity:1; transform:none; } }
@media(prefers-reduced-motion:reduce) { #main.page-arrive-a,#main.page-arrive-b { animation:none; } }
