:root {
  color-scheme: light;
  --bg: #f3f4f5;
  --surface: #f5f6f7;
  --ink: #171819;
  --muted: #6e7277;
  --line: rgba(38, 41, 44, .1);
  --white: rgba(255, 255, 255, .88);
  --shadow: 18px 18px 42px rgba(174, 179, 184, .28), -18px -18px 42px rgba(255, 255, 255, .82);
  --shadow-small: 8px 8px 18px rgba(174, 179, 184, .26), -8px -8px 18px rgba(255, 255, 255, .8);
  --inset: inset 4px 4px 10px rgba(177, 182, 187, .22), inset -4px -4px 10px rgba(255, 255, 255, .78);
  --max: 1180px;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(255,255,255,.95), transparent 29rem),
    linear-gradient(135deg, #f7f8f8 0%, var(--bg) 52%, #eceef0 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}

a { color: inherit; }
button { font: inherit; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.site-header {
  width: min(calc(100% - 64px), var(--max));
  margin: 30px auto 0;
  padding: 16px 18px 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 28px;
  background: rgba(244,245,246,.72);
  box-shadow: var(--shadow-small);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.brand { text-decoration: none; font-size: 1rem; font-weight: 650; letter-spacing: .16em; }
.header-controls { display: flex; align-items: center; gap: 12px; }
.pill-nav { display: flex; align-items: center; gap: 4px; padding: 4px; border-radius: 999px; background: rgba(231,233,235,.52); box-shadow: var(--inset); }
.pill-nav a { min-width: 78px; padding: 10px 16px; border-radius: 999px; color: var(--muted); text-align: center; text-decoration: none; font-size: .875rem; transition: color .2s ease, box-shadow .2s ease, transform .2s ease; }
.pill-nav a:hover { color: var(--ink); }
.pill-nav a:active { transform: translateY(1px); }
.pill-nav a[aria-current="page"] { color: var(--ink); background: rgba(250,251,251,.9); box-shadow: var(--shadow-small); }
.language-switch { display: flex; align-items: center; gap: 2px; padding: 4px; border: 1px solid rgba(255,255,255,.7); border-radius: 999px; background: rgba(231,233,235,.5); box-shadow: var(--inset); }
.language-switch button { min-width: 42px; padding: 10px 9px; color: var(--muted); border: 0; border-radius: 999px; background: transparent; font-size: .72rem; letter-spacing: .08em; cursor: pointer; }
.language-switch button[aria-pressed="true"] { color: var(--ink); background: rgba(250,251,251,.9); box-shadow: var(--shadow-small); }
.pill-nav a:focus-visible, .brand:focus-visible, button:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.home-main { position: relative; width: min(calc(100% - 64px), var(--max)); flex: 1; min-height: 620px; margin: 0 auto; display: grid; place-items: center; }
.home-copy { position: absolute; z-index: 1; left: 0; top: clamp(72px, 11vh, 128px); max-width: 560px; margin: 0; font-size: clamp(.9rem, 1.05vw, 1rem); font-weight: 400; letter-spacing: -.01em; line-height: 1.4; }
.hero-art { width: min(68vw, 780px); aspect-ratio: 10 / 7; display: grid; place-items: center; animation: arrive 1.15s cubic-bezier(.2,.75,.2,1) both; }
.hero-art img { display: block; width: 100%; height: auto; }

.page-main { width: min(calc(100% - 64px), 980px); flex: 1; margin: clamp(76px, 11vh, 130px) auto 100px; }
.page-heading { border-bottom: 1px solid var(--line); padding-bottom: 34px; }
.eyebrow { margin: 0 0 12px; color: var(--muted); font-size: .75rem; font-weight: 650; letter-spacing: .18em; text-transform: uppercase; }
.page-heading h1 { margin: 0; font-size: clamp(3.6rem, 9vw, 7.2rem); font-weight: 350; letter-spacing: -.065em; line-height: .9; }

.app-list { margin-top: 42px; }
.app-card { width: 100%; min-height: 230px; padding: 28px; display: grid; grid-template-columns: 52px minmax(0,1fr) 150px; grid-template-rows: 1fr auto; gap: 18px 26px; color: inherit; text-align: left; text-decoration: none; border: 1px solid rgba(255,255,255,.8); border-radius: 34px; background: rgba(244,245,246,.74); box-shadow: var(--shadow); cursor: pointer; transition: transform .25s ease, box-shadow .25s ease; }
.app-card:hover { transform: translateY(-3px); box-shadow: 22px 22px 48px rgba(174,179,184,.3), -20px -20px 44px rgba(255,255,255,.88); }
.app-card:active { transform: translateY(1px); box-shadow: var(--inset); }
.app-number { padding-top: 8px; color: var(--muted); font-size: .8rem; letter-spacing: .1em; }
.app-copy { align-self: center; display: flex; flex-direction: column; gap: 8px; }
.app-name { font-size: clamp(2rem, 5vw, 3.8rem); font-weight: 390; letter-spacing: -.045em; }
.app-note { color: var(--muted); font-size: 1rem; }
.app-icon-placeholder { grid-row: 1 / 3; grid-column: 3; place-self: center; width: 132px; aspect-ratio: 1; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.82); border-radius: 31%; background: rgba(241,243,244,.84); box-shadow: var(--shadow-small); }
.app-icon-placeholder img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 31%; }
.app-status { grid-column: 2; align-self: end; width: max-content; padding: 10px 15px; border: 1px solid rgba(255,255,255,.7); border-radius: 999px; color: #51555a; background: rgba(245,246,247,.62); box-shadow: var(--shadow-small); font-size: .8rem; letter-spacing: .04em; }
.app-labels { grid-column: 2; align-self: end; display: flex; flex-wrap: wrap; gap: 8px; }
.app-label { display: inline-flex; min-height: 32px; padding: 7px 13px; align-items: center; border-radius: 999px; font-size: .75rem; font-weight: 650; letter-spacing: .06em; line-height: 1; }
.app-label--free { color: #f5f6f7; background: #202224; box-shadow: 5px 5px 12px rgba(174,179,184,.3), -4px -4px 10px rgba(255,255,255,.72); }
.quiet-note { margin: 56px 0 0; color: var(--muted); font-size: .95rem; }

.others-main { max-width: 980px; }
.empty-panel { min-height: 320px; margin-top: 42px; padding: 44px; display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; border: 1px solid rgba(255,255,255,.8); border-radius: 34px; background: rgba(244,245,246,.62); box-shadow: var(--shadow); }
.empty-panel h2 { margin: 0 0 10px; font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 390; letter-spacing: -.045em; }
.empty-panel p { max-width: 380px; margin: 0; color: var(--muted); line-height: 1.65; }
.empty-orbit { align-self: flex-start; width: 138px; aspect-ratio: 1; padding: 27px; border-radius: 50%; box-shadow: var(--inset); }
.empty-orbit span { display: block; width: 100%; height: 100%; border: 1px solid rgba(72,76,80,.13); border-radius: 50%; box-shadow: var(--shadow-small); }

.site-footer { width: min(calc(100% - 64px), var(--max)); margin: auto auto 28px; padding-top: 20px; display: flex; justify-content: space-between; color: var(--muted); border-top: 1px solid var(--line); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; }

.notice-dialog { width: min(calc(100% - 36px), 440px); padding: 34px; color: var(--ink); border: 1px solid rgba(255,255,255,.82); border-radius: 30px; background: rgba(244,245,246,.96); box-shadow: 0 28px 80px rgba(44,48,52,.24), var(--shadow-small); }
.notice-dialog::backdrop { background: rgba(228,231,233,.58); backdrop-filter: blur(7px); }
.notice-dialog h2 { margin: 0 0 12px; font-size: 2.25rem; font-weight: 420; letter-spacing: -.04em; }
.notice-dialog > p:not(.eyebrow) { margin: 0; color: var(--muted); line-height: 1.6; }
.notice-dialog button { margin-top: 28px; padding: 11px 18px; border: 1px solid rgba(255,255,255,.75); border-radius: 999px; color: var(--ink); background: var(--surface); box-shadow: var(--shadow-small); cursor: pointer; }
.dialog-mark { width: 54px; aspect-ratio: 1; margin-bottom: 32px; border-radius: 50%; background: linear-gradient(145deg,#fafafa,#ccd1d5); box-shadow: var(--shadow-small); }

@keyframes arrive { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }

@media (max-width: 680px) {
  .site-header { width: calc(100% - 32px); margin-top: max(16px, env(safe-area-inset-top)); padding: 14px; border-radius: 25px; flex-direction: column; gap: 15px; }
  .brand { margin-top: 2px; font-size: .86rem; }
  .header-controls { width: 100%; gap: 8px; }
  .pill-nav { min-width: 0; flex: 1; }
  .pill-nav a { flex: 1; min-width: 0; padding: 10px 8px; font-size: .82rem; }
  .language-switch { flex: 0 0 auto; }
  .language-switch button { min-width: 34px; padding: 10px 6px; font-size: .65rem; }
  .home-main { width: calc(100% - 28px); min-height: 480px; }
  .home-copy { top: 54px; left: 2px; max-width: 330px; font-size: .95rem; }
  .hero-art { width: min(112vw, 600px); transform-origin: center; }
  .page-main { width: calc(100% - 32px); margin-top: 64px; margin-bottom: 74px; }
  .page-heading { padding-bottom: 25px; }
  .page-heading h1 { font-size: clamp(3.4rem, 19vw, 5rem); }
  .app-list { margin-top: 28px; }
  .app-card { min-height: 300px; padding: 24px; grid-template-columns: 34px 1fr 92px; grid-template-rows: 1fr auto; border-radius: 29px; gap: 16px 10px; }
  .app-icon-placeholder { width: 86px; }
  .app-name { font-size: 2rem; }
  .app-note { font-size: .9rem; line-height: 1.5; }
  .empty-panel { min-height: 350px; padding: 28px; flex-direction: column-reverse; align-items: flex-start; border-radius: 29px; }
  .empty-orbit { width: 112px; }
  .site-footer { width: calc(100% - 32px); margin-bottom: max(22px, env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
