/* ------------------------------------------------------------------
   iPad portfolio: desk stage + iPadOS screen
   ------------------------------------------------------------------ */
@font-face {
  font-family: "Inter";
  src: url("../assets/ipad/fonts/inter/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../assets/ipad/fonts/inter/InterVariable-Italic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --font: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro", system-ui, sans-serif;
  --bg: #0a0b10;
  --ink: #0b0d14;
  --ink-2: rgba(11, 13, 20, 0.62);
  --ink-3: rgba(11, 13, 20, 0.4);
  --paper: rgba(255, 255, 255, 0.94);
  --paper-2: rgba(255, 255, 255, 0.7);
  --line: rgba(11, 13, 20, 0.08);
  --accent: #2f6bff;
  --card: #fff;
  --fill: rgba(0, 0, 0, 0.06);
  --fill-2: rgba(0, 0, 0, 0.03);
  --side: rgba(0, 0, 0, 0.035);
  --scroll: rgba(0, 0, 0, 0.15);
  --switch-off: rgba(120, 120, 128, 0.32);
  --radius-win: 20px;
}
/* dark appearance (Settings → Appearance), scoped to the iPad screen */
.screen.is-dark {
  --ink: #f2f3f7;
  --ink-2: rgba(242, 243, 247, 0.62);
  --ink-3: rgba(242, 243, 247, 0.4);
  --paper: rgba(30, 31, 36, 0.94);
  --paper-2: rgba(30, 31, 36, 0.7);
  --line: rgba(255, 255, 255, 0.09);
  --accent: #4d8dff;
  --card: #2a2b31;
  --fill: rgba(255, 255, 255, 0.08);
  --fill-2: rgba(255, 255, 255, 0.045);
  --side: rgba(255, 255, 255, 0.035);
  --scroll: rgba(255, 255, 255, 0.18);
  --switch-off: rgba(120, 120, 128, 0.4);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg);
  color: #fff;
  font-family: var(--font);
  font-feature-settings: "cv11", "ss01", "ss03";
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  user-select: none;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }

/* ---------- stage (3D) ---------- */
#stage { position: fixed; inset: 0; }
#gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#css3d { position: absolute; inset: 0; pointer-events: none; }
#stage.is-paused { display: none; }

/* ---------- flat (lifted) ---------- */
#flat {
  position: fixed; inset: 0;
  display: grid; place-items: center;
  background: #000;
}

/* ---------- loader ---------- */
.loader {
  position: fixed; left: 0; top: 0; right: 0; height: 2px; z-index: 50;
  background: rgba(255,255,255,0.08);
}
.loader-bar i {
  display: block; height: 100%; width: 0%;
  background: #fff; transition: width .4s ease;
}
.loader.is-done { opacity: 0; transition: opacity .5s ease .3s; }

/* ---------- screen ---------- */
.screen {
  position: absolute;
  overflow: hidden;
  background: #000 url("../assets/ipad/wallpapers/ipados15-light.jpg") center / cover no-repeat;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  pointer-events: auto;
  cursor: pointer;
  isolation: isolate;
}
.screen.is-dark { background-image: url("../assets/ipad/wallpapers/ipados15-dark.jpg"); }
/* light iPadOS wallpaper: dark labels, like the real thing */
.screen.wall-light { --lbl: #1c1c1e; }
.screen.wall-light .statusbar, .screen.wall-light .wg-label, .screen.wall-light .home-search { color: var(--lbl); text-shadow: none; }
.screen.wall-light .sb-batt { border-color: var(--lbl); }
.screen.wall-light .sb-batt i, .screen.wall-light .sb-batt::after { background: var(--lbl); }
.screen.wall-light .sb-btn { background: rgba(0,0,0,.08); }
.screen.wall-light .sb-btn:hover { background: rgba(0,0,0,.14); }
.screen.wall-light .lock-hint-pill { background: rgba(0,0,0,.08); color: var(--lbl); }
.screen.wall-light .home-search { background: rgba(255,255,255,.45); }
.screen.wall-light .dock-sep { background: rgba(0,0,0,.18); }
.screen.wall-light .dock { background: rgba(255,255,255,.5); box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 12px 40px rgba(0,0,0,.14); }
.screen.is-flat { cursor: default; border-radius: 0 !important; }
.screen .glare {
  position: absolute; inset: 0; z-index: 30; pointer-events: none;
  background:
    linear-gradient(115deg, rgba(255,255,255,0.10) 0%, rgba(255,255,255,0.04) 35%, rgba(255,255,255,0) 60%),
    radial-gradient(120% 90% at 10% 0%, rgba(255,255,255,0.08), rgba(255,255,255,0) 50%);
  mix-blend-mode: screen;
  opacity: 1; transition: opacity .6s ease;
}
.screen.is-flat .glare { opacity: 0; }

/* ---------- lock screen ---------- */
.lock {
  position: absolute; inset: 0; z-index: 20;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  padding: 6vh 0 4vh;
  transition: transform .7s cubic-bezier(.2,.8,.2,1), opacity .5s ease;
}
.lock.is-leaving { transform: translateY(-14%); opacity: 0; }
.lock-time { text-align: center; text-shadow: 0 2px 24px rgba(0,0,0,0.25); }
.lock-date { font-size: clamp(14px, 1.6vw, 22px); font-weight: 600; letter-spacing: .01em; opacity: .9; }
.lock-clock { font-size: clamp(64px, 11vw, 150px); font-weight: 700; line-height: 1; letter-spacing: -.03em; margin-top: 4px; }
.lock-hint-pill {
  display: inline-block; padding: 10px 18px; border-radius: 999px;
  background: rgba(255,255,255,0.16); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  font-size: clamp(14px, 1.5vw, 20px); font-weight: 600;
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { transform: translateY(0); opacity: .85 } 50% { transform: translateY(-4px); opacity: 1 } }

/* ---------- home ---------- */
.home {
  position: absolute; inset: 0; z-index: 10;
  display: flex; flex-direction: column;
  opacity: 0; transform: scale(1.04);
  transition: opacity .6s ease .1s, transform .8s cubic-bezier(.2,.8,.2,1) .1s;
}
.home.is-in { opacity: 1; transform: none; }

.statusbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 22px 0; height: 38px;
  font-size: 14px; font-weight: 600;
  text-shadow: 0 1px 2px rgba(0,0,0,.25);
}
.sb-left, .sb-right { display: flex; align-items: center; gap: 10px; }
.sb-date { opacity: .8; font-weight: 500; }
.sb-ico { width: 17px; height: 17px; }
.sb-batt { width: 26px; height: 12px; border: 1.5px solid rgba(255,255,255,.9); border-radius: 4px; padding: 1.5px; position: relative; }
.sb-batt::after { content: ""; position: absolute; right: -4px; top: 3px; width: 2px; height: 4px; background: rgba(255,255,255,.9); border-radius: 0 1px 1px 0; }
.sb-batt i { display: block; height: 100%; width: 100%; background: #fff; border-radius: 2px; }
.sb-btn {
  padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: rgba(255,255,255,.18); backdrop-filter: blur(10px);
  transition: background .2s;
}
.sb-btn:hover { background: rgba(255,255,255,.3); }

.home-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-auto-rows: clamp(84px, 13vh, 156px);
  gap: clamp(10px, 2.4vh, 30px) clamp(8px, 2vw, 40px);
  padding: clamp(14px, 3vh, 36px) clamp(32px, 7vw, 120px) clamp(10px, 2vh, 20px);
  align-content: start;
}
.app {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 8px;
  min-width: 0;
  transition: transform .15s ease;
}
.app:active { transform: scale(.92); }
.app img {
  width: clamp(44px, 6.2vw, 84px); height: clamp(44px, 6.2vw, 84px);
  filter: drop-shadow(0 6px 14px rgba(0,0,0,.32));
}
.app span {
  font-size: clamp(10px, 1.05vw, 13px); font-weight: 600; letter-spacing: .005em;
  text-shadow: 0 1px 2px rgba(0,0,0,.55), 0 0 12px rgba(0,0,0,.35);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}

.dock {
  margin: 0 auto clamp(10px, 2.2vh, 24px);
  display: flex; gap: clamp(10px, 1.6vw, 22px);
  padding: clamp(8px, 1.2vh, 14px) clamp(12px, 1.6vw, 22px);
  border-radius: 30px;
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(30px) saturate(160%); -webkit-backdrop-filter: blur(30px) saturate(160%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 12px 40px rgba(0,0,0,.3);
}
.dock .app { gap: 0; }
.dock .app span { display: none; }
.dock .app img { width: clamp(40px, 5.2vw, 70px); height: clamp(40px, 5.2vw, 70px); }
.dock .app:hover { transform: translateY(-6px) scale(1.06); }
.dock { align-items: center; }
.dock-sep { align-self: stretch; width: 1px; margin: 6px 2px; background: rgba(255,255,255,.28); }

/* ---------- home widgets (iPadOS style) ---------- */
.screen { --wg: rgba(255,255,255,.9); --wg-ink: #1c1c1e; --wg-ink-2: rgba(28,28,30,.6); --wg-line: rgba(0,0,0,.08); }
.screen.is-dark { --wg: rgba(28,28,30,.86); --wg-ink: #f5f5f7; --wg-ink-2: rgba(245,245,247,.6); --wg-line: rgba(255,255,255,.1); }
.home-grid { overflow-y: auto; scrollbar-width: none; }
.home-grid::-webkit-scrollbar { display: none; }
.wg-wrap { display: flex; flex-direction: column; gap: 8px; min-width: 0; min-height: 0; }
.wg-profile  { grid-column: 1 / 3; grid-row: 1 / 3; }
.wg-projects { grid-column: 3 / 7; grid-row: 1 / 3; }
.wg-articles { grid-column: 1 / 5; grid-row: 3 / 5; }
.wg-small    { grid-column: 5 / 7; grid-row: 3 / 5; }
.wg {
  flex: 1; min-height: 0; position: relative; overflow: hidden;
  border-radius: clamp(18px, 2vw, 28px);
  background: var(--wg); color: var(--wg-ink);
  backdrop-filter: blur(30px) saturate(160%); -webkit-backdrop-filter: blur(30px) saturate(160%);
  box-shadow: 0 10px 34px rgba(0,0,0,.22), inset 0 0 0 .5px rgba(255,255,255,.12);
  text-align: left; isolation: isolate;
  transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s;
}
.wg-wrap:hover .wg { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(0,0,0,.28), inset 0 0 0 .5px rgba(255,255,255,.14); }
.wg-wrap:active .wg { transform: scale(.985); }
.wg-label {
  text-align: center; font-size: clamp(10px, 1.05vw, 13px); font-weight: 600;
  text-shadow: 0 1px 2px rgba(0,0,0,.55), 0 0 12px rgba(0,0,0,.35);
  transition: opacity .2s;
}
.wg-page { display: flex; flex-direction: column; width: 100%; height: 100%; padding: clamp(14px, 1.6vw, 20px); color: inherit; text-align: left; position: relative; overflow: hidden; }
.wg .dot { width: 8px; height: 8px; border-radius: 50%; background: #34c759; box-shadow: 0 0 0 3px rgba(52,199,89,.2); display: inline-block; flex: none; animation: live 2.4s ease-in-out infinite; }
@keyframes live { 0%,100% { box-shadow: 0 0 0 3px rgba(52,199,89,.22) } 50% { box-shadow: 0 0 0 6px rgba(52,199,89,0) } }

/* Smart Stack */
.wg-track { height: 100%; transform: translateY(calc(var(--i, 0) * -100%)); transition: transform .7s cubic-bezier(.3,.9,.2,1); }
.wg-stack .wg-page { height: 100%; }
.wg-dots { position: absolute; right: 7px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 5px; z-index: 3; padding: 4px 3px; border-radius: 99px; }
.wg-dots i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .35; cursor: pointer; transition: opacity .2s, transform .2s; }
.wg-dots i.on { opacity: 1; transform: scale(1.15); }
.wg-projects .wg-dots { color: #fff; }

/* Projects page */
.wj { padding: 0; color: #fff; justify-content: flex-end; }
.wj-media { position: absolute; inset: 0; z-index: -1; background: #111; }
.wj-media img, .wj-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.wj-media img { transform: scale(1.01); transition: transform 9s linear, opacity .4s; }
.wg-page[aria-hidden="false"] .wj-media img { transform: scale(1.08); }
.wj-media video { opacity: 0; transition: opacity .4s; }
.wj.is-playing video { opacity: 1; }
.wj-shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(0,0,0,.5) 0%, rgba(0,0,0,0) 26%, rgba(0,0,0,0) 40%, rgba(0,0,0,.6) 62%, rgba(0,0,0,.88) 100%); }
.wj-bar { background: rgba(0,0,0,.38); backdrop-filter: blur(20px) saturate(160%); -webkit-backdrop-filter: blur(20px) saturate(160%); box-shadow: inset 0 .5px 0 rgba(255,255,255,.12); }
.wj-kicker { position: absolute; top: clamp(14px, 1.6vw, 20px); left: clamp(16px, 1.8vw, 22px); font-size: 11px; font-weight: 700; letter-spacing: .09em; opacity: .9; text-transform: uppercase; }
.wj-bar { display: flex; align-items: center; gap: 12px; padding: clamp(14px, 1.6vw, 20px) clamp(28px, 2.6vw, 34px) clamp(14px, 1.6vw, 20px) clamp(16px, 1.8vw, 22px); }
.wj-ico { width: clamp(40px, 3.6vw, 52px) !important; height: clamp(40px, 3.6vw, 52px) !important; border-radius: 12px !important; flex: none; box-shadow: 0 4px 14px rgba(0,0,0,.35); }
.wj-id { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.wj-id b { font-size: clamp(16px, 1.6vw, 22px); font-weight: 750; letter-spacing: -.015em; }
.wj-id span { font-size: clamp(11px, 1vw, 13.5px); opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wj-get { flex: none; font-size: 13px; font-weight: 700; padding: 6px 16px; border-radius: 999px; background: rgba(255,255,255,.22); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.wj:hover .wj-get { background: rgba(255,255,255,.34); }

/* Profile */
.wg-profile .wg-page { justify-content: space-between; gap: 10px; }
.wp-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.wp-photo { width: clamp(46px, 4.6vw, 66px); height: clamp(46px, 4.6vw, 66px); border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px var(--wg), 0 6px 16px rgba(0,0,0,.2); }
.wp-photo-fb { display: grid; place-items: center; font-weight: 800; font-size: 26px; color: #fff; background: linear-gradient(135deg, #34d399, #059669); }
.wp-time { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.15; }
.wp-time b { font-size: clamp(15px, 1.5vw, 20px); font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.wp-time em { font-style: normal; font-size: 11px; font-weight: 600; color: var(--wg-ink-2); text-transform: uppercase; letter-spacing: .06em; }
.wp-id { display: flex; flex-direction: column; gap: 3px; }
.wp-id b { font-size: clamp(17px, 1.8vw, 24px); font-weight: 750; letter-spacing: -.02em; line-height: 1.1; }
.wp-id span { font-size: clamp(11px, 1vw, 13px); color: var(--wg-ink-2); line-height: 1.35; }
.wp-id p { margin: 8px 0 0; font-size: clamp(12px, 1.1vw, 14px); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.wp-now { display: flex; align-items: center; gap: 8px; font-size: clamp(11px, 1vw, 12.5px); font-weight: 600; color: #1f9d4a; }
.screen.is-dark .wp-now { color: #4cd964; }

/* Articles (Notes-style medium widget) */
.wg-articles .wg { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.wa-hero { position: relative; overflow: hidden; background: #111; }
.wa-hero img { position: absolute; inset: 0; width: 100%; height: 100%; transition: transform .6s cubic-bezier(.2,.8,.2,1); }
.wa-blur { object-fit: cover; filter: blur(24px) saturate(140%); transform: scale(1.3); opacity: .7; }
.wa-img { object-fit: contain; }
.wa-hero:hover .wa-img { transform: scale(1.03); }
.wa-new { position: absolute; top: 12px; left: 12px; font-size: 11px; font-weight: 700; letter-spacing: .04em; color: #1c1c1e; background: #ffd60a; padding: 3px 9px; border-radius: 999px; }
.wa-side { display: flex; flex-direction: column; min-width: 0; padding: clamp(12px, 1.4vw, 18px) clamp(14px, 1.5vw, 20px); gap: 2px; overflow: hidden; }
.wa-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.wa-head img { width: 22px; height: 22px; border-radius: 6px; }
.wa-head b { font-size: 13px; font-weight: 700; color: #d4a20a; flex: 1; }
.screen.is-dark .wa-head b { color: #ffd60a; }
.wa-head span { font-size: 12px; font-weight: 600; color: var(--wg-ink-2); }
.wa-row { display: flex; flex-direction: column; gap: 2px; text-align: left; color: inherit; padding: 7px 0; border-top: .5px solid var(--wg-line); min-width: 0; }
.wa-row:first-of-type { border-top: 0; }
.wa-row b { font-size: clamp(12px, 1.05vw, 13.5px); font-weight: 600; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-row em { font-style: normal; font-size: 11.5px; color: var(--wg-ink-2); }
.wa-row-top b { font-size: clamp(14px, 1.3vw, 17px); font-weight: 750; letter-spacing: -.01em; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.wa-row:hover b { color: var(--accent); }
.wa-empty { align-items: center; justify-content: center; color: var(--wg-ink-2); }

/* Experience "Now" page */
.wn { justify-content: space-between; gap: 8px; padding-right: clamp(26px, 2.4vw, 30px); }
.wn-top { display: flex; align-items: center; justify-content: space-between; }
.wn-logo { width: clamp(38px, 3.6vw, 50px); height: clamp(38px, 3.6vw, 50px); border-radius: 12px; display: grid; place-items: center; overflow: hidden; box-shadow: 0 0 0 .5px var(--wg-line), 0 4px 12px rgba(0,0,0,.12); }
.wn-logo img { width: 70%; height: 70%; object-fit: contain; }
.wn-live { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #1f9d4a; }
.screen.is-dark .wn-live { color: #4cd964; }
.wn-id { display: flex; flex-direction: column; gap: 3px; }
.wn-id b { font-size: clamp(15px, 1.5vw, 20px); font-weight: 750; letter-spacing: -.015em; line-height: 1.15; }
.wn-id span { font-size: clamp(11px, 1vw, 13px); color: var(--wg-ink-2); }
.wn-id p { margin: 6px 0 0; font-size: clamp(11px, 1vw, 12.5px); line-height: 1.4; color: var(--wg-ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wn-foot, .wh-foot { display: flex; justify-content: space-between; font-size: 11.5px; font-weight: 600; color: var(--wg-ink-2); }

/* GitHub contributions page */
.wh { gap: 10px; padding-right: clamp(26px, 2.4vw, 30px); }
.wh-head { display: flex; align-items: baseline; gap: 8px; }
.wh-head b { font-size: clamp(20px, 2vw, 28px); font-weight: 800; letter-spacing: -.02em; }
.wh-head span { font-size: 12px; color: var(--wg-ink-2); font-weight: 600; }
.wh-cal { flex: 1; min-height: 0; display: grid; grid-template-rows: repeat(7, minmax(0, 1fr)); grid-auto-flow: column; grid-auto-columns: max-content; justify-content: end; gap: 3px; overflow: hidden; }
.wh-cal .gh-day { height: 100%; aspect-ratio: 1; border-radius: 3px; }

/* Search pill above the dock (iOS-style) */
.home-search {
  align-self: center; display: inline-flex; align-items: center; gap: 6px;
  margin-bottom: clamp(8px, 1.4vh, 14px); padding: 6px 14px; border-radius: 999px;
  font-size: 13px; font-weight: 600; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.3);
  background: rgba(255,255,255,.18); backdrop-filter: blur(20px) saturate(160%); -webkit-backdrop-filter: blur(20px) saturate(160%);
  transition: background .2s, transform .2s;
}
.home-search:hover { background: rgba(255,255,255,.3); }
.home-search svg { width: 14px; height: 14px; }

/* Spotlight */
.spot { position: absolute; inset: 0; z-index: 40; background: rgba(0,0,0,.28); backdrop-filter: blur(22px) saturate(140%); -webkit-backdrop-filter: blur(22px) saturate(140%); opacity: 0; transition: opacity .2s; cursor: default; color: var(--ink); }
.spot.is-in { opacity: 1; }
.spot-panel { width: min(640px, 92%); margin: clamp(48px, 11vh, 120px) auto 0; display: flex; flex-direction: column; gap: 10px; transform: translateY(-10px) scale(.98); transition: transform .3s cubic-bezier(.2,.9,.2,1); }
.spot.is-in .spot-panel { transform: none; }
.spot-field { display: flex; align-items: center; gap: 12px; height: 54px; padding: 0 16px; border-radius: 16px; background: var(--paper); box-shadow: 0 18px 50px rgba(0,0,0,.3); }
.spot-field .sym { width: 20px; height: 20px; color: var(--ink-2); }
.spot-field input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: inherit; font-size: 20px; color: var(--ink); }
.spot-field input::placeholder { color: var(--ink-3); }
.spot-field kbd { font: 600 11px var(--font); color: var(--ink-3); border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px; }
.spot-res { max-height: min(60vh, 560px); overflow-y: auto; padding: 8px; border-radius: 18px; background: var(--paper); box-shadow: 0 18px 50px rgba(0,0,0,.3); }
.sp-h { font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); padding: 10px 10px 6px; }
.sp-apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 4px; padding: 0 2px 4px; }
.sp-app { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 4px; border-radius: 12px; color: var(--ink); font-size: 11.5px; font-weight: 600; }
.sp-app img { width: 48px; height: 48px; }
.sp-app:hover { background: var(--fill); }
.sp-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 12px; width: 100%; padding: 8px 10px; border-radius: 12px; text-align: left; color: var(--ink); }
.sp-row:hover, .sp-row.is-sel { background: var(--fill); }
.sp-row.is-sel { box-shadow: inset 0 0 0 1.5px var(--accent); }
.sp-row > img, .sp-row .sp-thumb, .sp-row .sp-pj, .sp-row .sp-logo { width: 40px !important; height: 40px !important; border-radius: 10px; object-fit: cover; }
.sp-logo { display: grid; place-items: center; overflow: hidden; box-shadow: inset 0 0 0 .5px var(--line); }
.sp-logo img { width: 70%; height: 70%; object-fit: contain; }
.sp-row > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sp-row b { font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-row em { font-style: normal; font-size: 12.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-kind { font-style: normal; font-size: 11px; font-weight: 600; color: var(--ink-3); background: var(--fill); padding: 2px 8px; border-radius: 999px; }
.sp-none { padding: 26px; text-align: center; color: var(--ink-2); font-size: 14px; }

/* Notification banner */
.banner {
  position: absolute; z-index: 35; top: 44px; left: 50%;
  width: min(440px, 92%); transform: translate(-50%, -160%);
  display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 12px; align-items: start;
  padding: 12px 14px; border-radius: 22px; text-align: left; color: var(--ink);
  background: var(--paper-2); backdrop-filter: blur(30px) saturate(180%); -webkit-backdrop-filter: blur(30px) saturate(180%);
  box-shadow: 0 16px 44px rgba(0,0,0,.28), inset 0 0 0 .5px rgba(255,255,255,.15);
  transition: transform .55s cubic-bezier(.2,1.2,.3,1);
}
.banner.is-in { transform: translate(-50%, 0); }
.banner img { width: 38px; height: 38px; border-radius: 9px; }
.bn-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.bn-top { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-2); }
.bn-top b { font-weight: 600; text-transform: uppercase; letter-spacing: .04em; font-size: 11px; }
.bn-top em { font-style: normal; }
.bn-title { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bn-sub { font-size: 13px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.35; }

/* ---------- windows (Stage Manager style) ---------- */
#windows { position: absolute; inset: 0; z-index: 15; pointer-events: none; }
.win {
  position: absolute;
  width: min(1180px, 80%); height: 80%;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  border-radius: var(--radius-win);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 30px 80px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.15);
  display: flex; flex-direction: column;
  overflow: hidden;
  pointer-events: auto;
  animation: win-in .45s cubic-bezier(.2,.8,.2,1);
  backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px);
}
.win.is-closing { animation: win-out .25s ease forwards; }
@keyframes win-in { from { opacity: 0; transform: translate(-50%, -46%) scale(.94); } }
@keyframes win-out { to { opacity: 0; transform: translate(-50%, -48%) scale(.96); } }
.win-head {
  display: flex; align-items: center; gap: 12px;
  height: 48px; padding: 0 14px 0 16px;
  border-bottom: 1px solid var(--line);
  cursor: grab; flex: none;
}
.win-head:active { cursor: grabbing; }
.win-head img { width: 24px; height: 24px; border-radius: 6px; }
.win-title { font-weight: 600; font-size: 15px; flex: 1; }
.win-close {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  color: var(--ink-2); transition: background .15s;
}
.win-close:hover { background: var(--fill); color: var(--ink); }
.win-close svg { width: 14px; height: 14px; }
.win-body { flex: 1; overflow: auto; padding: 28px 32px 40px; user-select: text; }
.win-body::-webkit-scrollbar { width: 10px; }
.win-body::-webkit-scrollbar-thumb { background: var(--scroll); border-radius: 10px; border: 3px solid transparent; background-clip: content-box; }

/* app content primitives */
.h1 { font-size: 32px; font-weight: 700; letter-spacing: -.025em; margin: 0 0 6px; }
.h2 { font-size: 20px; font-weight: 700; letter-spacing: -.015em; margin: 28px 0 10px; }
.sub { color: var(--ink-2); font-size: 15px; margin: 0 0 24px; }
.muted { color: var(--ink-3); }
.empty {
  padding: 36px; border: 1.5px dashed var(--line); border-radius: 16px; text-align: center;
  color: var(--ink-2); font-size: 15px; line-height: 1.5;
}
.empty code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; background: var(--fill); padding: 2px 6px; border-radius: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 12px; font-weight: 600; padding: 4px 9px; border-radius: 999px; background: var(--fill); color: var(--ink-2); }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: 12px; font-weight: 600; font-size: 14px;
  background: var(--accent); color: #fff; text-decoration: none;
}
.btn.ghost { background: var(--fill); color: var(--ink); }
.btn svg { width: 15px; height: 15px; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-weight: 600; font-size: 14px; margin-bottom: 18px; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.card {
  border-radius: 16px; overflow: hidden; background: var(--card);
  box-shadow: 0 0 0 1px var(--line), 0 8px 24px rgba(0,0,0,.08);
  cursor: pointer; transition: transform .2s ease, box-shadow .2s ease; text-align: left;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(0,0,0,.14); }
.card-cover { aspect-ratio: 16 / 10; background: linear-gradient(135deg, var(--c1, #5b8cff), var(--c2, #2f5bd8)); display: grid; place-items: center; }
.card-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-cover b { font-size: 48px; color: rgba(255,255,255,.9); font-weight: 800; letter-spacing: -.04em; }
.card-body { padding: 14px 16px 16px; }
.card-title { font-weight: 700; font-size: 16px; margin: 0 0 4px; }
.card-sub { font-size: 13px; color: var(--ink-2); margin: 0 0 10px; line-height: 1.4; }

.rows { display: flex; flex-direction: column; }
.row {
  display: grid; grid-template-columns: 92px 1fr auto; gap: 18px; align-items: baseline;
  padding: 16px 4px; border-bottom: 1px solid var(--line); text-align: left; cursor: pointer;
}
.row:hover { background: var(--fill-2); }
.row-date { font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.row-title { font-weight: 600; font-size: 16px; }
.row-sub { font-size: 14px; color: var(--ink-2); margin-top: 3px; line-height: 1.45; }
.row-meta { font-size: 13px; color: var(--ink-3); white-space: nowrap; }

.timeline { position: relative; padding-left: 28px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.tl-item { position: relative; padding: 0 0 28px; }
.tl-item::before { content: ""; position: absolute; left: -26px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.tl-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tl-head img { width: 34px; height: 34px; border-radius: 9px; object-fit: contain; background: var(--card); box-shadow: 0 0 0 1px var(--line); }
.tl-role { font-weight: 700; font-size: 17px; }
.tl-company { color: var(--ink-2); font-weight: 500; }
.tl-dates { font-size: 13px; color: var(--ink-3); margin: 4px 0 10px; }
.tl-item p { margin: 0 0 8px; line-height: 1.5; font-size: 15px; }
.tl-item ul { margin: 0; padding-left: 18px; line-height: 1.55; font-size: 14.5px; color: var(--ink-2); }

.about-hero { display: flex; gap: 22px; align-items: center; margin-bottom: 24px; }
.avatar { width: 92px; height: 92px; border-radius: 50%; object-fit: cover; background: linear-gradient(135deg,#34d399,#059669); flex: none; display: grid; place-items: center; font-size: 36px; font-weight: 800; color: #fff; }
.prose p { line-height: 1.6; font-size: 15.5px; margin: 0 0 14px; }
.prose a { color: var(--accent); text-decoration: none; font-weight: 600; border-bottom: 1.5px solid rgba(47,107,255,.25); }
.prose a:hover { border-bottom-color: var(--accent); }
.facet { margin-top: 22px; }
.facet-label { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 10px; }
.chip-strong { background: rgba(47,107,255,.12); color: var(--accent); }
.links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }


/* ---------- Settings ---------- */
.win-body.is-settings { padding: 0; display: grid; grid-template-columns: 250px minmax(0, 1fr); overflow: hidden; }
.set-side { background: var(--side); border-right: 1px solid var(--line); padding: 18px 12px; overflow: auto; }
.set-side-title { font-size: 28px; font-weight: 700; letter-spacing: -.02em; padding: 4px 10px 16px; }
.set-item {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 7px 10px; border-radius: 10px; font-size: 15px; font-weight: 500; text-align: left;
  transition: background .15s;
}
.set-item:hover { background: var(--fill-2); }
.set-item.is-on, .set-item.is-on:hover { background: var(--accent); color: #fff; }
.set-ico { width: 30px; height: 30px; border-radius: 8px; background: var(--c); display: grid; place-items: center; flex: none; }
.set-ico i { width: 18px; height: 18px; background: #fff; -webkit-mask-size: contain; mask-size: contain; -webkit-mask-position: center; mask-position: center; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; }
.set-pane { overflow: auto; padding: 28px 32px 40px; user-select: text; }
.set-group { background: var(--card); border-radius: 14px; box-shadow: 0 0 0 1px var(--line); margin-bottom: 22px; overflow: hidden; }
.set-row { display: flex; align-items: center; gap: 16px; padding: 12px 16px; min-height: 52px; }
.set-row + .set-row { border-top: 1px solid var(--line); }
.set-row-text { flex: 1; min-width: 0; }
.set-row-title { font-size: 15px; font-weight: 500; }
.set-row-title a { text-decoration: none; color: var(--accent); }
.set-row-sub { font-size: 13px; color: var(--ink-2); margin-top: 2px; line-height: 1.4; }
.set-row-val { color: var(--ink-2); font-size: 15px; text-align: right; }
.set-row-link { width: 15px; height: 15px; color: var(--ink-3); flex: none; }
.set-note { font-size: 13px; color: var(--ink-3); padding: 0 16px; margin: -10px 0 22px; line-height: 1.5; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }

.switch { width: 51px; height: 31px; border-radius: 999px; background: var(--switch-off); position: relative; flex: none; transition: background .2s; }
.switch::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff;
  box-shadow: 0 3px 8px rgba(0,0,0,.15), 0 1px 1px rgba(0,0,0,.16);
  transition: transform .22s cubic-bezier(.2,.8,.2,1);
}
.switch[aria-checked="true"] { background: #34c759; }
.switch[aria-checked="true"]::after { transform: translateX(20px); }

.appearance-pick { display: flex; flex-wrap: wrap; gap: 26px; padding: 20px 18px; }
.ap { display: flex; flex-direction: column; align-items: center; gap: 12px; font-size: 14px; font-weight: 500; color: var(--ink-2); }
.ap-thumb {
  width: 150px; aspect-ratio: 4 / 3; border-radius: 14px; position: relative; overflow: hidden;
  background-size: cover; background-position: center; box-shadow: 0 0 0 1px var(--line);
  transition: transform .2s ease;
}
.ap-thumb::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 58%; height: 56%; transform: translate(-50%, -50%);
  border-radius: 7px; background: rgba(255,255,255,.92); box-shadow: 0 6px 16px rgba(0,0,0,.25);
}
.ap.dark .ap-thumb::after { background: rgba(30,31,36,.94); }
.ap.wp .ap-thumb::after { display: none; }
.ap:hover .ap-thumb { transform: scale(1.03); }
.ap-label { display: inline-flex; align-items: center; gap: 8px; }
.tick { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--ink-3); display: grid; place-items: center; color: transparent; transition: background .15s, border-color .15s; }
.tick svg { width: 11px; height: 11px; }
.ap.is-on { color: var(--ink); }
.ap.is-on .tick { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------- Photos ---------- */
.masonry { columns: 3 220px; column-gap: 14px; }
.photo {
  display: block; width: 100%; break-inside: avoid; margin: 0 0 14px;
  border-radius: 14px; overflow: hidden; position: relative; background: var(--fill);
  transition: transform .2s ease;
}
.photo img { display: block; width: 100%; height: auto; }
.photo:hover { transform: scale(1.015); }
.photo-cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 24px 12px 10px;
  font-size: 12px; font-weight: 500; color: #fff; text-align: left;
  background: linear-gradient(transparent, rgba(0,0,0,.6)); opacity: 0; transition: opacity .2s;
}
.photo:hover .photo-cap { opacity: 1; }

.lightbox {
  position: absolute; inset: 0; z-index: 5; background: rgba(8,9,12,.94); color: #fff;
  display: grid; grid-template-columns: 64px minmax(0, 1fr) 64px; align-items: center;
  animation: fade .2s ease;
}
.lightbox.is-out { animation: fade .18s ease reverse forwards; }
@keyframes fade { from { opacity: 0; } }
.lightbox figure { margin: 0; height: 100%; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 56px 0 30px; }
.lightbox img { max-width: 100%; max-height: calc(100% - 44px); object-fit: contain; border-radius: 6px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.lightbox figcaption { font-size: 14px; opacity: .92; display: flex; gap: 12px; }
.lightbox figcaption span { opacity: .6; }
.lb-nav, .lb-close {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; justify-self: center;
  background: rgba(255,255,255,.1); color: #fff; transition: background .15s;
}
.lb-nav:hover, .lb-close:hover { background: rgba(255,255,255,.24); }
.lb-nav svg { width: 18px; height: 18px; }
.lb-close { position: absolute; top: 12px; right: 14px; width: 34px; height: 34px; }
.lb-close svg { width: 14px; height: 14px; }

/* ---------- Videos ---------- */
.video-cover { aspect-ratio: 16 / 9; position: relative; background: #111; }
.play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: rgba(0,0,0,.55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: transform .2s ease, background .2s ease;
}
.play svg { width: 20px; height: 20px; margin-left: 3px; fill: currentColor; }
.card:hover .play { transform: translate(-50%, -50%) scale(1.08); background: var(--accent); }
.dur { position: absolute; right: 8px; bottom: 8px; padding: 2px 7px; border-radius: 6px; background: rgba(0,0,0,.75); color: #fff; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.player { aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: #000; box-shadow: 0 12px 40px rgba(0,0,0,.25); }
.player iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ---------- Code ---------- */
.sub + .h2 { margin-top: 0; }
.count { font-size: 12px; font-weight: 600; color: var(--ink-3); background: var(--fill); padding: 2px 8px; border-radius: 999px; vertical-align: 3px; margin-left: 8px; }
.row.repo { text-decoration: none; }
.row-meta.mono { color: var(--ink-3); }

/* ---------- small screens ---------- */
@media (max-width: 760px) {
  .win-body.is-settings { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .set-side { display: flex; gap: 4px; padding: 10px; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .set-side-title { display: none; }
  .set-item { width: auto; white-space: nowrap; padding-right: 14px; }
  .set-pane { padding: 20px 18px 32px; }
  .lightbox { grid-template-columns: 44px minmax(0, 1fr) 44px; }
  .row.repo { grid-template-columns: 1fr; }
  .home-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); padding-left: 16px; padding-right: 16px; }
  .home-grid { grid-auto-rows: clamp(76px, 12vh, 100px); }
  .wg-profile, .wg-projects, .wg-articles, .wg-small { grid-column: 1 / -1; grid-row: auto / span 2; }
  .wg-articles { grid-row: auto / span 3; }
  .wg-articles .wg { grid-template-columns: 1fr; grid-template-rows: 42% minmax(0, 1fr); }
  .win { width: 94%; height: 86%; }
  .win-body { padding: 20px 18px 32px; }
  .row { grid-template-columns: 1fr; gap: 4px; }
  .row-date { order: 2; }
}

/* ---------- About: iPadOS-style profile screen ---------- */
.sym { display: inline-block; width: 16px; height: 16px; background: currentColor; -webkit-mask-size: contain; mask-size: contain; -webkit-mask-position: center; mask-position: center; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; }
.win-body.is-about { padding: 0 0 40px; }
.ab-hero { padding: 34px 32px 26px; background: var(--side); border-bottom: 1px solid var(--line); margin-bottom: 26px; }
.ab-hero-in { display: flex; gap: 26px; align-items: center; flex-wrap: wrap; }
.ab-photo { width: 132px; height: 132px; border-radius: 50%; object-fit: cover; flex: none; box-shadow: 0 10px 28px rgba(0,0,0,.18), 0 0 0 1px var(--line); }
.ab-photo-fallback { display: grid; place-items: center; font-size: 56px; font-weight: 800; color: #fff; background: linear-gradient(135deg, #34d399, #059669); }
.ab-id { min-width: 0; flex: 1; }
.ab-name { font-size: clamp(28px, 3.2vw, 38px); font-weight: 800; letter-spacing: -.03em; margin: 0 0 4px; line-height: 1.05; }
.ab-role { font-size: 16px; color: var(--ink-2); font-weight: 500; }
.ab-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.ab-pill { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px; background: var(--fill); font-size: 13px; font-weight: 600; color: var(--ink); }
.ab-live { background: rgba(52,199,89,.14); color: #1f9d4a; }
.ab-social { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ab-soc { display: inline-flex; align-items: center; gap: 8px; padding: 7px 13px 7px 10px; border-radius: 999px; background: var(--paper); color: var(--ink); text-decoration: none; font-size: 13px; font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 0 0 1px var(--line); transition: transform .15s ease, box-shadow .15s ease; }
.ab-soc:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0,0,0,.14), 0 0 0 1px var(--line); }
.ab-soc .sym { width: 15px; height: 15px; }
.screen.is-dark .ab-live { color: #4cd964; }
.ab-live .dot { width: 8px; height: 8px; border-radius: 50%; background: #34c759; box-shadow: 0 0 0 3px rgba(52,199,89,.25); animation: live 2s ease-in-out infinite; }
@keyframes live { 0%,100% { box-shadow: 0 0 0 3px rgba(52,199,89,.25); } 50% { box-shadow: 0 0 0 6px rgba(52,199,89,.08); } }
.ab-lead { margin: 0 32px 18px; padding: 0; }
.ab-lead p { font-size: clamp(19px, 1.9vw, 24px); font-weight: 600; letter-spacing: -.018em; line-height: 1.35; margin: 0; }
.ab-group { margin: 0 32px; }
.ab-h { font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); margin: 28px 32px 12px; }
.ab-cols { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 0 24px; margin: 6px 32px 0; }
.ab-col { min-width: 0; }
.ab-col .ab-h { margin-left: 0; margin-right: 0; }
.ab-skills { display: grid; grid-template-columns: 1fr; gap: 10px; }
.ab-skill { display: flex; align-items: center; gap: 13px; padding: 12px 14px; border-radius: 16px; background: var(--fill); font-weight: 600; font-size: 14px; transition: background .15s, transform .18s ease; }
.ab-skill:hover { background: var(--fill-2); transform: translateY(-1px); }
.ab-skill-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; line-height: 1.3; }
.ab-skill-txt b { font-size: 14.5px; font-weight: 700; }
.ab-skill-txt span { font-size: 13px; color: var(--ink-2); font-weight: 500; line-height: 1.4; }
.ab-tool .ab-skill-ico { width: 40px; height: 40px; border-radius: 11px; box-shadow: 0 6px 14px rgba(0,0,0,.14), inset 0 1px 0 rgba(255,255,255,.22); }
.ab-tool .ab-skill-ico .sym { width: 22px; height: 22px; }
.ab-tool .ab-skill-txt span { text-transform: uppercase; letter-spacing: .06em; font-size: 11.5px; font-weight: 700; color: var(--ink-3); }
.ab-skill-ico { width: 38px; height: 38px; border-radius: 10.5px; background: var(--c); color: #fff; display: grid; place-items: center; flex: none; box-shadow: inset 0 1px 0 rgba(255,255,255,.25); }
.ab-skill-ico .sym { width: 20px; height: 20px; }
.ab-stack { display: flex; flex-wrap: wrap; gap: 22px 24px; margin: 0 32px; }
.ab-tile { display: flex; flex-direction: column; align-items: center; gap: 9px; width: 78px; }
.ab-tile-ico { width: 66px; height: 66px; border-radius: 17px; background: var(--c); color: var(--fg); display: grid; place-items: center; box-shadow: 0 10px 22px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.22); transition: transform .18s ease; }
.ab-tile:hover .ab-tile-ico { transform: translateY(-3px) scale(1.04); }
.ab-tile-ico .sym { width: 36px; height: 36px; }
.ab-tile-ico b { font-size: 28px; font-weight: 800; }
.ab-tile-label { font-size: 12px; font-weight: 600; color: var(--ink-2); }
@media (max-width: 760px) {
  .ab-hero { padding: 26px 18px 22px; }
  .ab-photo { width: 96px; height: 96px; }
  .ab-lead, .ab-group, .ab-cols { margin-left: 18px; margin-right: 18px; }
  .ab-cols { grid-template-columns: 1fr; }
  .ab-h { margin-left: 18px; }
}

/* ---------- Projects: App Store-style ---------- */
.win-body.is-projects { padding: 0 0 40px; }
.pj-head { padding: 26px 32px 14px; }
.pj-kicker { font-size: 12px; font-weight: 700; letter-spacing: .08em; color: var(--ink-3); }
.pj-title { font-size: 34px; font-weight: 800; letter-spacing: -.03em; margin: 2px 0 0; }
.pj-featured { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 480px), 1fr)); gap: 18px; padding: 0 32px; }
.pj-feat { position: relative; aspect-ratio: 16 / 10; border-radius: 22px; overflow: hidden; text-align: left; color: #fff; isolation: isolate; box-shadow: 0 14px 36px rgba(0,0,0,.22); transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s; }
.pj-feat:hover { transform: scale(1.015); box-shadow: 0 22px 50px rgba(0,0,0,.3); }
.pj-feat:active { transform: scale(.985); }
.pj-feat-media { position: absolute; inset: 0; z-index: -2; background: #111; }
.pj-feat-media img, .pj-feat-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pj-feat-media video { opacity: 0; transition: opacity .4s ease; }
.pj-feat.is-playing .pj-feat-media video { opacity: 1; }
.pj-feat-shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(to bottom, rgba(0,0,0,.72) 0%, rgba(0,0,0,.25) 30%, rgba(0,0,0,0) 48%, rgba(0,0,0,.75) 100%); }
.pj-feat-top { position: absolute; left: 22px; right: 22px; top: 20px; text-shadow: 0 1px 2px rgba(0,0,0,.4); }
.pj-feat-kicker { font-size: 11.5px; font-weight: 700; letter-spacing: .1em; opacity: .85; }
.pj-feat-top h3 { font-size: clamp(24px, 2.6vw, 32px); font-weight: 800; letter-spacing: -.025em; margin: 4px 0 4px; line-height: 1.05; }
.pj-feat-top p { font-size: 14px; margin: 0; opacity: .9; max-width: 32ch; line-height: 1.35; }
.pj-feat-bar { position: absolute; left: 14px; right: 14px; bottom: 14px; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; background: rgba(255,255,255,.14); backdrop-filter: blur(22px) saturate(160%); -webkit-backdrop-filter: blur(22px) saturate(160%); box-shadow: inset 0 1px 0 rgba(255,255,255,.2); }
.pj-feat-id { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pj-feat-id b { font-size: 15px; font-weight: 700; }
.pj-feat-id span { font-size: 12px; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pj-get { flex: none; padding: 6px 16px; border-radius: 999px; background: rgba(255,255,255,.92); color: #0b0d14; font-size: 13px; font-weight: 700; letter-spacing: .01em; }
.pj-ico { width: 44px; height: 44px; border-radius: 11px; overflow: hidden; flex: none; display: grid; place-items: center; box-shadow: 0 4px 12px rgba(0,0,0,.2); background: #fff; }
.pj-ico img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pj-ico-gen { background: linear-gradient(135deg, var(--c1), var(--c2)); color: #fff; }
.pj-ico-gen .sym { width: 52%; height: 52%; }
.pj-ico-sm { width: 56px; height: 56px; border-radius: 14px; }
.pj-ico-lg { width: 118px; height: 118px; border-radius: 28px; box-shadow: 0 12px 30px rgba(0,0,0,.22); }
.pj-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 6px 28px; padding: 0 32px; }
.pj-row { display: flex; align-items: center; gap: 14px; padding: 12px 8px 12px 0; text-align: left; border-bottom: 1px solid var(--line); color: var(--ink); border-radius: 12px; transition: background .15s; }
.pj-row:hover { background: var(--fill); padding-left: 8px; }
.pj-row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pj-row-text b { font-size: 15px; font-weight: 700; }
.pj-row-text span { font-size: 13px; color: var(--ink-2); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pj-row-text em { font-style: normal; font-size: 11.5px; color: var(--ink-3); font-weight: 600; }
.pj-row .pj-get { background: var(--fill); color: var(--accent); }
/* detail */
.pd-back { padding: 20px 32px 0; }
.pd-head { display: flex; gap: 22px; align-items: flex-start; padding: 18px 32px 0; flex-wrap: wrap; }
.pd-id { flex: 1; min-width: 240px; }
.pd-id h1 { font-size: clamp(26px, 3vw, 34px); font-weight: 800; letter-spacing: -.03em; margin: 2px 0 2px; line-height: 1.05; }
.pd-tag { font-size: 15.5px; color: var(--ink-2); margin: 0 0 14px; line-height: 1.4; }
.pd-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pd-actions .btn { padding: 8px 18px; border-radius: 999px; font-size: 14px; }
.pd-meta { display: flex; gap: 0; margin: 22px 32px 0; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow-x: auto; }
.pd-m { flex: 1; min-width: 110px; text-align: center; padding: 2px 10px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; }
.pd-m:last-child { border-right: 0; }
.pd-m span { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.pd-m b { font-size: 14px; font-weight: 700; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pd-gallery { display: flex; gap: 12px; padding: 0 32px 6px; scroll-padding-inline: 32px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.pd-shot { height: clamp(180px, 28vw, 300px); aspect-ratio: 16 / 9; object-fit: cover; border-radius: 14px; flex: none; scroll-snap-align: start; box-shadow: 0 8px 22px rgba(0,0,0,.18); cursor: zoom-in; background: #000; }
.pd-video { cursor: default; }
.pd-gwrap { position: relative; }
.pd-gwrap .pd-gallery { scrollbar-width: none; cursor: grab; }
.pd-gwrap .pd-gallery::-webkit-scrollbar { display: none; }
.pd-gwrap.is-dragging .pd-gallery { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.pd-gwrap.is-dragging .pd-shot { pointer-events: none; }
/* soft fades hint that there is more to either side */
.pd-gwrap::before, .pd-gwrap::after { content: ""; position: absolute; top: 0; bottom: 6px; width: 48px; pointer-events: none; z-index: 1; transition: opacity .25s; }
.pd-gwrap::before { left: 0; background: linear-gradient(90deg, var(--paper), transparent); }
.pd-gwrap::after { right: 0; background: linear-gradient(270deg, var(--paper), transparent); }
.pd-gwrap.at-start::before, .pd-gwrap.at-end::after { opacity: 0; }
.pd-nav { position: absolute; top: calc(50% - 3px); z-index: 2; width: 40px; height: 40px; margin-top: -20px; border-radius: 50%; display: grid; place-items: center; color: var(--ink); background: var(--paper); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 6px 20px rgba(0,0,0,.2), inset 0 0 0 .5px var(--line); opacity: 0; transform: scale(.9); transition: opacity .2s, transform .2s; }
.pd-nav svg { width: 18px; height: 18px; }
.pd-nav.prev { left: 14px; } .pd-nav.next { right: 14px; }
.pd-gwrap:hover .pd-nav:not(:disabled) { opacity: 1; transform: none; }
.pd-nav:hover { transform: scale(1.06) !important; }
.pd-nav:disabled { pointer-events: none; }
.pd-gwrap.no-scroll .pd-nav { display: none; }
@media (hover: none) { .pd-nav:not(:disabled) { opacity: .9; transform: none; } }
.pd-body { margin: 22px 32px 0; }
.pd-body h2 { font-size: 17px; margin: 22px 0 8px; }
.pd-body ul, .pd-body ol { padding-left: 20px; line-height: 1.55; font-size: 15px; }
.pd-body li { margin-bottom: 6px; }
.pd-body pre, .pd-body code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.pd-body pre { background: var(--fill); padding: 12px 14px; border-radius: 12px; overflow-x: auto; }
.pd-body p code { background: var(--fill); padding: 1px 6px; border-radius: 6px; }
.pd-info { margin: 0 32px; border-radius: 16px; background: var(--fill); padding: 4px 16px; }
.pd-row { display: grid; grid-template-columns: 110px 1fr; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.pd-row:last-child { border-bottom: 0; }
.pd-row > span { font-size: 13px; color: var(--ink-3); font-weight: 600; }
.pd-row b { font-weight: 600; }
.pd-row a { color: var(--accent); text-decoration: none; font-weight: 600; }
@media (max-width: 760px) {
  .pj-head, .pj-featured, .pj-list, .pd-back, .pd-head, .pd-gallery { padding-left: 18px; padding-right: 18px; }
  .pd-gallery { scroll-padding-inline: 18px; }
  .pd-meta, .pd-body, .pd-info { margin-left: 18px; margin-right: 18px; }
  .pj-feat { aspect-ratio: 4 / 4.4; }
}

/* ---------- Articles: Notes-style reader ---------- */
.win-body.is-articles { padding: 0; display: flex; overflow: hidden; }
.nt-side { width: 300px; flex: none; border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.nt-side-head { padding: 22px 18px 8px; display: flex; align-items: baseline; justify-content: space-between; }
.nt-side-head h1 { font-size: 28px; font-weight: 800; letter-spacing: -.03em; margin: 0; }
.nt-side-head span { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.nt-list { overflow: auto; padding: 4px 10px 20px; }
.nt-row { display: flex; gap: 12px; width: 100%; text-align: left; padding: 12px; border-radius: 12px; align-items: flex-start; color: var(--ink); transition: background .15s; }
.nt-row + .nt-row { margin-top: 2px; }
.nt-row:hover { background: var(--fill); }
.nt-row.is-on { background: rgba(47,107,255,.12); }
.nt-row-text { flex: 1; min-width: 0; }
.nt-row b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 14.5px; font-weight: 700; line-height: 1.3; margin-bottom: 4px; }
.nt-row-meta { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 12.5px; color: var(--ink-2); line-height: 1.4; }
.nt-row-meta em { font-style: normal; color: var(--ink); font-weight: 600; margin-right: 8px; font-variant-numeric: tabular-nums; }
.nt-row img { width: 54px; height: 54px; object-fit: cover; border-radius: 9px; flex: none; box-shadow: 0 0 0 1px var(--line); }
.nt-pane { flex: 1; min-width: 0; overflow: auto; }
.nt-back { display: none; margin: 14px 18px 0; }
.nt-article { max-width: 720px; margin: 0 auto; padding: 30px 36px 60px; }
.nt-cover { width: 100%; max-height: 420px; object-fit: contain; background: var(--fill); border-radius: 16px; margin-bottom: 22px; box-shadow: 0 10px 30px rgba(0,0,0,.15); }
.nt-title { font-size: clamp(24px, 2.6vw, 32px); font-weight: 800; letter-spacing: -.025em; line-height: 1.12; margin: 0 0 12px; }
.nt-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; font-size: 13.5px; color: var(--ink-2); padding-bottom: 16px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.nt-tags i { font-style: normal; color: var(--ink-3); margin-right: 6px; }
.nt-x { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 999px; background: var(--ink); color: var(--paper); text-decoration: none; font-weight: 600; font-size: 12.5px; margin-left: auto; }
.nt-x .sym { width: 12px; height: 12px; }
.nt-body p { font-size: 17px; line-height: 1.65; margin: 0 0 18px; }
.nt-body h2 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; margin: 34px 0 12px; line-height: 1.2; }
.nt-body h3 { font-size: 19px; font-weight: 700; margin: 26px 0 10px; }
.nt-body h4 { font-size: 16px; font-weight: 700; margin: 20px 0 8px; }
.nt-body figure { margin: 24px 0; }
.nt-body figure img { width: 100%; border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.14); display: block; }
.nt-body figcaption { font-size: 13px; color: var(--ink-3); text-align: center; margin-top: 10px; line-height: 1.4; }
.nt-body pre { background: #0f1117; color: #e6e8ef; padding: 16px 18px; border-radius: 12px; overflow-x: auto; font-size: 13.5px; line-height: 1.55; margin: 0 0 20px; }
.nt-body code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .92em; background: var(--fill); padding: 1px 6px; border-radius: 6px; }
.nt-body pre code { background: none; padding: 0; font-size: inherit; }
.nt-body blockquote { margin: 20px 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--accent); color: var(--ink-2); font-size: 17px; line-height: 1.6; }
.nt-body .md-table { overflow-x: auto; margin: 0 0 20px; }
.nt-body table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.45; }
.nt-body th, .nt-body td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line, rgba(127,127,127,.2)); vertical-align: top; }
.nt-body th { font-weight: 700; color: var(--ink-2); font-size: 13px; }
.nt-body .md-math { margin: 0 0 20px; font-size: 20px; }
.nt-body ul, .nt-body ol { padding-left: 22px; font-size: 17px; line-height: 1.6; margin: 0 0 18px; }
.nt-body li { margin-bottom: 6px; }
.nt-body a { color: var(--accent); text-decoration: none; border-bottom: 1.5px solid rgba(47,107,255,.3); }
.nt-foot { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }
.nt-foot .btn { border-radius: 999px; }
.nt-foot .sym { width: 14px; height: 14px; }
@media (max-width: 760px) {
  .nt-side { width: 100%; border-right: 0; }
  .nt-pane { display: none; }
  .is-reading .nt-side { display: none; }
  .is-reading .nt-pane { display: block; }
  .nt-back { display: inline-flex; }
  .nt-article { padding: 12px 18px 40px; }
}

/* ---------- Contact: Mail compose + contact card ---------- */
.win-body.is-contact { padding: 0; }
.ct-wrap { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr); gap: 0; min-height: 100%; }
.ct-compose { border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.ct-bar { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.ct-bar b { font-size: 16px; font-weight: 700; }
.ct-cancel { color: var(--accent); font-weight: 600; font-size: 15px; }
.ct-send { width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; box-shadow: 0 4px 12px rgba(47,107,255,.35); transition: transform .15s; }
.ct-send:hover { transform: scale(1.06); }
.ct-send .sym { width: 16px; height: 16px; transform: translate(-1px, 1px); }
.ct-form { display: flex; flex-direction: column; flex: 1; }
.ct-field { display: flex; align-items: center; gap: 10px; padding: 11px 18px; border-bottom: 1px solid var(--line); font-size: 15px; }
.ct-field > span { color: var(--ink-3); width: 64px; flex: none; }
.ct-field input { flex: 1; min-width: 0; background: none; border: 0; color: var(--ink); font: inherit; outline: none; }
.ct-field input::placeholder, .ct-form textarea::placeholder { color: var(--ink-3); }
.ct-to { flex: 1; min-width: 0; }
.ct-chip { display: inline-flex; align-items: baseline; gap: 6px; padding: 4px 11px; border-radius: 999px; background: rgba(47,107,255,.14); color: var(--accent); font-weight: 600; font-size: 14px; max-width: 100%; }
.ct-chip i { font-style: normal; font-weight: 500; opacity: .75; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ct-form textarea { flex: 1; min-height: 180px; resize: none; background: none; border: 0; outline: none; padding: 16px 18px; font: inherit; font-size: 16px; line-height: 1.55; color: var(--ink); }
.ct-hint { padding: 10px 18px 16px; font-size: 12.5px; color: var(--ink-3); line-height: 1.5; }
.ct-hint b { color: var(--ink-2); font-weight: 600; }
.ct-form.is-sent .ct-send { background: #34c759; }
.ct-card { padding: 28px 24px 24px; display: flex; flex-direction: column; gap: 18px; }
.ct-card-head { text-align: center; }
.ct-avatar { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; box-shadow: 0 10px 26px rgba(0,0,0,.22), 0 0 0 4px var(--paper); display: block; margin: 0 auto 12px; }
.ct-avatar-fb { display: grid; place-items: center; font-size: 38px; font-weight: 800; color: #fff; background: linear-gradient(135deg, #34d399, #059669); }
.ct-card-head h2 { font-size: 22px; font-weight: 800; letter-spacing: -.02em; margin: 0 0 2px; }
.ct-card-head p { margin: 0; font-size: 14px; color: var(--ink-2); }
.ct-status { display: inline-flex; align-items: center; gap: 7px; margin-top: 10px; padding: 5px 11px; border-radius: 999px; background: var(--fill); font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.ct-status .dot { width: 8px; height: 8px; border-radius: 50%; background: #34c759; box-shadow: 0 0 0 3px rgba(52,199,89,.22); }
.ct-status .dot.is-off { background: #ff9f0a; box-shadow: 0 0 0 3px rgba(255,159,10,.22); }
.ct-rows { border-radius: 16px; background: var(--fill); overflow: hidden; }
.ct-row { display: flex; align-items: center; gap: 12px; padding: 11px 14px; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); transition: background .15s; }
.ct-row:last-child { border-bottom: 0; }
.ct-row:hover { background: rgba(0,0,0,.04); }
.screen.is-dark .ct-row:hover { background: rgba(255,255,255,.05); }
.ct-row div { min-width: 0; display: flex; flex-direction: column; }
.ct-row em { font-style: normal; font-size: 11.5px; color: var(--ink-3); font-weight: 600; }
.ct-row b { font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ct-row-ico { width: 34px; height: 34px; border-radius: 9px; background: var(--c, var(--ink)); color: #fff; display: grid; place-items: center; flex: none; }
.ct-row-brand { background: var(--ink); color: var(--paper); }
.ct-row-ico .sym { width: 17px; height: 17px; }
.ct-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ct-actions .btn { flex: 1; justify-content: center; border-radius: 12px; }
.ct-actions .sym { width: 15px; height: 15px; }
@media (max-width: 760px) {
  .ct-wrap { grid-template-columns: 1fr; }
  .ct-compose { border-right: 0; border-bottom: 1px solid var(--line); }
  .ct-form textarea { min-height: 140px; }
}

/* ---------- Experience: iPadOS split view (sidebar + inset grouped detail) ---------- */
.win-body.is-exp { padding: 0; display: flex; overflow: hidden; }
.ex-side { width: 300px; flex: none; background: var(--side); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.ex-side-head { padding: 22px 18px 8px; display: flex; align-items: baseline; justify-content: space-between; }
.ex-side-head h1 { font-size: 28px; font-weight: 800; letter-spacing: -.03em; margin: 0; }
.ex-side-head span { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.ex-list { overflow: auto; padding: 4px 10px 20px; }
.ex-group-h { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); padding: 14px 12px 6px; }
.ex-group-h:first-child { padding-top: 4px; }
.ex-row { display: flex; gap: 12px; width: 100%; text-align: left; padding: 10px 12px; border-radius: 12px; align-items: center; color: var(--ink); transition: background .15s; }
.ex-row + .ex-row { margin-top: 2px; }
.ex-row:hover { background: var(--fill-2); }
.ex-row.is-on, .ex-row.is-on:hover { background: var(--accent); color: #fff; }
.ex-row-logo { width: 44px; height: 44px; border-radius: 11px; flex: none; display: grid; place-items: center; background: var(--bg, var(--card)); box-shadow: 0 0 0 1px var(--line); overflow: hidden; }
.ex-row-logo img { width: 64%; height: 64%; object-fit: contain; }
.ex-row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.ex-row-text b { font-size: 14.5px; font-weight: 700; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ex-row-text span { font-size: 13px; color: var(--ink-2); margin-top: 1px; }
.ex-row-text em { font-style: normal; font-size: 12px; color: var(--ink-3); margin-top: 3px; font-variant-numeric: tabular-nums; }
.ex-row.is-on .ex-row-text span, .ex-row.is-on .ex-row-text em { color: rgba(255,255,255,.78); }
.ex-row-dot { width: 8px; height: 8px; border-radius: 50%; background: #34c759; box-shadow: 0 0 0 3px rgba(52,199,89,.25); flex: none; }
.ex-row.is-on .ex-row-dot { background: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,.3); }
.ex-pane { flex: 1; min-width: 0; overflow: auto; }
.ex-back { display: none; margin: 14px 18px 0; }
.ex-detail { max-width: 760px; margin: 0 auto; padding: 30px 32px 48px; }
.ex-head { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.ex-logo { width: 88px; height: 88px; border-radius: 22px; flex: none; display: grid; place-items: center; background: var(--bg, var(--card)); box-shadow: 0 12px 30px rgba(0,0,0,.16), 0 0 0 1px var(--line); overflow: hidden; }
.ex-logo img { width: 62%; height: 62%; object-fit: contain; }
.ex-logo-fallback { font-size: 36px; font-weight: 800; color: #fff; background: linear-gradient(135deg, #2f6bff, #5856d6); }
.ex-id { min-width: 0; flex: 1; }
.ex-title { font-size: clamp(22px, 2.6vw, 30px); font-weight: 800; letter-spacing: -.03em; margin: 0 0 3px; line-height: 1.08; }
.ex-company { font-size: 15.5px; color: var(--ink-2); font-weight: 500; }
.ex-dot { color: var(--ink-3); margin: 0 2px; }
.ex-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ex-meta .sym { width: 14px; height: 14px; opacity: .8; }
.ex-summary { margin: 22px 0 6px; }
.ex-summary p { font-size: 16px; line-height: 1.5; margin: 0; color: var(--ink); }
.ex-h { font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); margin: 26px 16px 8px; }
.ex-detail .set-group { margin-bottom: 0; }
.ex-hl { padding: 13px 16px; }
.ex-hl .set-row-title { font-size: 15px; font-weight: 600; line-height: 1.3; }
.ex-hl .set-row-sub { font-size: 13.5px; line-height: 1.45; margin-top: 3px; }
.ex-hl .set-ico { width: 34px; height: 34px; border-radius: 9px; }
.ex-hl .set-ico i { width: 19px; height: 19px; }
.ex-link-row { text-decoration: none; color: inherit; transition: background .15s; }
.ex-link-row:hover { background: var(--fill-2); }
.ex-link-row .sym { width: 15px; height: 15px; color: var(--ink-3); flex: none; }
.ex-stack { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 14px; }
.ex-chip { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; border-radius: 999px; background: var(--fill); font-size: 13.5px; font-weight: 600; }
.ex-chip-ico { width: 26px; height: 26px; border-radius: 8px; background: var(--c); color: var(--fg); display: grid; place-items: center; box-shadow: inset 0 1px 0 rgba(255,255,255,.22); }
.ex-chip-ico .sym { width: 15px; height: 15px; }
@media (max-width: 760px) {
  .ex-side { width: 100%; border-right: 0; }
  .ex-pane { display: none; }
  .is-detail .ex-side { display: none; }
  .is-detail .ex-pane { display: block; }
  .ex-back { display: inline-flex; }
  .ex-detail { padding: 18px 18px 36px; }
  .ex-logo { width: 68px; height: 68px; border-radius: 17px; }
}

/* ---------- Code: GitHub profile, iPadOS style ---------- */
.win-body.is-code { padding: 0 0 40px; }
.gh-loading { padding: 40px; color: var(--ink-3); font-size: 14px; }
.gh-hero { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; padding: 30px 32px 22px; background: var(--side); border-bottom: 1px solid var(--line); }
.gh-avatar { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; flex: none; background: var(--fill); box-shadow: 0 10px 28px rgba(0,0,0,.18), 0 0 0 1px var(--line); }
.gh-id { flex: 1; min-width: 200px; }
.gh-name { font-size: clamp(24px, 2.6vw, 30px); font-weight: 800; letter-spacing: -.03em; margin: 0 0 2px; line-height: 1.1; }
.gh-login { font-size: 15px; color: var(--ink-2); font-weight: 500; }
.gh-bio { margin: 8px 0 0; font-size: 14px; color: var(--ink-2); line-height: 1.45; }
.gh-open { border-radius: 999px; padding: 9px 16px; }
.gh-open .sym { width: 16px; height: 16px; }
.gh-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 22px 32px 0; }
.gh-stat { padding: 14px 16px; border-radius: 16px; background: var(--fill); }
.gh-stat b { display: block; font-size: 26px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.gh-stat span { font-size: 12.5px; color: var(--ink-2); font-weight: 500; }
.is-code .ex-h { margin: 26px 48px 8px; }
.gh-card { margin: 0 32px; padding: 14px 16px 12px; }
.gh-cal-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; font-size: 14px; }
.gh-cal-head b { font-weight: 700; }
.gh-cal-head span { color: var(--ink-3); font-size: 13px; }
.gh-cal-scroll { overflow-x: auto; padding-bottom: 4px; }
.gh-months { display: grid; grid-template-columns: repeat(var(--weeks), 1fr); gap: 3px; font-size: 10.5px; color: var(--ink-3); margin-bottom: 4px; min-width: 640px; }
.gh-months span { white-space: nowrap; }
.gh-cal { display: grid; grid-template-columns: repeat(var(--weeks), 1fr); grid-template-rows: repeat(7, 1fr); grid-auto-flow: column; gap: 3px; min-width: 640px; aspect-ratio: var(--weeks) / 7; }
.gh-day { display: block; border-radius: 2.5px; background: var(--fill); }
.gh-day.empty { background: transparent; }
.gh-day.l1 { background: rgba(52,199,89,.35); }
.gh-day.l2 { background: rgba(52,199,89,.6); }
.gh-day.l3 { background: rgba(52,199,89,.85); }
.gh-day.l4 { background: #1f9d4a; }
.screen.is-dark .gh-day.l4 { background: #4cd964; }
.gh-cal-foot { display: flex; gap: 16px; align-items: center; margin-top: 10px; font-size: 12.5px; color: var(--ink-2); flex-wrap: wrap; }
.gh-legend { margin-left: auto; display: inline-flex; align-items: center; gap: 3px; color: var(--ink-3); }
.gh-legend .gh-day { width: 10px; height: 10px; }
.gh-langbar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; gap: 2px; }
.gh-langbar i { display: block; min-width: 4px; }
.gh-langs { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; font-size: 13px; font-weight: 600; }
.gh-langs span { display: inline-flex; align-items: center; gap: 6px; }
.gh-langs em { font-style: normal; color: var(--ink-3); font-weight: 500; }
.gh-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.gh-pins { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin: 0 32px; }
.gh-pin { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border-radius: 16px; background: var(--fill); color: var(--ink); text-decoration: none; transition: background .15s, transform .18s ease; min-height: 118px; }
.gh-pin:hover { background: var(--fill-2); transform: translateY(-2px); }
.gh-pin-head { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.gh-pin-head .sym { width: 14px; height: 14px; color: var(--ink-3); }
.gh-pin p { margin: 0; font-size: 13px; color: var(--ink-2); line-height: 1.45; flex: 1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.gh-repo-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; font-size: 12.5px; color: var(--ink-3); font-weight: 500; }
.gh-repo-meta span { display: inline-flex; align-items: center; gap: 5px; }
.gh-repo-meta .sym { width: 12px; height: 12px; }
.gh-repos-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.gh-repos-h .count { margin-left: 6px; font-weight: 600; color: var(--ink-3); letter-spacing: 0; text-transform: none; }
.gh-sort { display: inline-flex; padding: 2px; border-radius: 9px; background: var(--fill); text-transform: none; letter-spacing: 0; }
.gh-sort-b { padding: 4px 12px; border-radius: 7px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); transition: background .15s, color .15s; }
.gh-sort-b.is-on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.gh-search { display: flex; align-items: center; gap: 8px; margin: 0 32px 10px; padding: 8px 12px; border-radius: 11px; background: var(--fill); color: var(--ink-3); }
.gh-search .sym { width: 15px; height: 15px; flex: none; }
.gh-search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; font: inherit; font-size: 15px; color: var(--ink); }
.gh-search input::placeholder { color: var(--ink-3); }
.gh-list { margin: 0 32px; }
.gh-repo { text-decoration: none; color: inherit; transition: background .15s; align-items: flex-start; padding-top: 13px; padding-bottom: 13px; }
.gh-repo:hover { background: var(--fill-2); }
.gh-repo > .sym { width: 15px; height: 15px; color: var(--ink-3); flex: none; margin-top: 3px; }
.gh-repo-name { font-weight: 600; display: flex; align-items: center; gap: 8px; }
.gh-tag { font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 999px; background: var(--fill); color: var(--ink-3); }
.is-code .set-note { margin: 12px 48px 0; padding: 0; }
@media (max-width: 760px) {
  .gh-hero { padding: 22px 18px 18px; }
  .gh-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 16px 18px 0; }
  .gh-card, .gh-pins, .gh-search, .gh-list { margin-left: 18px; margin-right: 18px; }
  .is-code .ex-h, .is-code .set-note { margin-left: 34px; margin-right: 34px; }
}

/* ---------- Links: Safari start page ---------- */
.win-body.is-links { padding: 0 0 40px; }
.sf-bar { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--paper); border-bottom: 1px solid var(--line); backdrop-filter: blur(20px); }
.sf-nav { width: 30px; height: 30px; display: grid; place-items: center; color: var(--ink-3); opacity: .45; }
.sf-nav .sym { width: 16px; height: 16px; }
.sf-url { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 11px; background: var(--fill); color: var(--ink); font-size: 14.5px; font-weight: 500; transition: background .15s; }
.sf-url:hover { background: var(--fill-2); }
.sf-url .sym { width: 13px; height: 13px; color: var(--ink-3); }
.sf-url .sym:last-child { opacity: 0; transition: opacity .15s; }
.sf-url:hover .sym:last-child { opacity: 1; }
.sf-url.is-done { color: #1f9d4a; }
.screen.is-dark .sf-url.is-done { color: #4cd964; }
.sf-url-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sf-share { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; color: var(--accent); transition: background .15s; }
.sf-share:hover { background: var(--fill); }
.sf-share .sym { width: 18px; height: 18px; }
.sf-page { padding: 8px 0 0; }
.is-links .ex-h { margin: 22px 48px 10px; }
.lk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; margin: 0 32px; }
.lk-tile { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 10px 14px; border-radius: 18px; background: var(--fill); color: var(--ink); text-decoration: none; text-align: center; transition: background .15s, transform .18s ease; }
.lk-tile:hover { background: var(--fill-2); transform: translateY(-2px); }
.lk-tile:active { transform: scale(.97); }
.lk-tile b { font-size: 13.5px; font-weight: 700; margin-top: 8px; }
.lk-tile span { font-size: 11.5px; color: var(--ink-3); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.lk-tile-ico { width: 60px; height: 60px; border-radius: 15px; background: var(--c); display: grid; place-items: center; box-shadow: 0 8px 20px rgba(0,0,0,.16), inset 0 1px 0 rgba(255,255,255,.2); overflow: hidden; }
.lk-tile-ico .sym { width: 30px; height: 30px; }
.lk-tile-ico img { width: 64%; height: 64%; object-fit: contain; }
.lk-app-ico { box-shadow: 0 8px 20px rgba(0,0,0,.16); display: block; object-fit: cover; }
.lk-ico { width: 36px; height: 36px; border-radius: 10px; background: var(--c); display: grid; place-items: center; flex: none; box-shadow: 0 0 0 1px var(--line); overflow: hidden; }
.lk-ico .sym { width: 18px; height: 18px; }
.lk-ico img { width: 64%; height: 64%; object-fit: contain; }
.is-links .set-group { margin: 0 32px; }
.lk-row .set-row-sub.mono { font-size: 12.5px; margin-top: 1px; }
.lk-copy, .lk-go { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; color: var(--ink-3); flex: none; transition: background .15s, color .15s; }
.lk-copy:hover, .lk-go:hover { background: var(--fill); color: var(--ink); }
.lk-copy.is-done { color: #1f9d4a; }
.screen.is-dark .lk-copy.is-done { color: #4cd964; }
.lk-copy .sym, .lk-go .sym { width: 15px; height: 15px; }
.is-links .set-note { margin: 12px 48px 0; padding: 0; }
@media (max-width: 760px) {
  .lk-grid, .is-links .set-group { margin-left: 18px; margin-right: 18px; }
  .is-links .ex-h, .is-links .set-note { margin-left: 34px; margin-right: 34px; }
  .lk-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- Resume: Quick Look sheet ---------- */
.win-body.is-resume { padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.rs-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 12px 18px; background: var(--paper); border-bottom: 1px solid var(--line); }
.rs-title { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.rs-title b { font-size: 14.5px; font-weight: 700; }
.rs-title span { font-size: 12.5px; color: var(--ink-3); font-weight: 500; }
.rs-actions { display: flex; gap: 8px; }
.rs-actions .btn { padding: 8px 14px; border-radius: 999px; font-size: 13.5px; }
.rs-actions .sym { width: 15px; height: 15px; }
.rs-stage { flex: 1; overflow: auto; background: var(--side); padding: 28px 24px 40px; }
.rs-sheet { width: min(100%, 720px); aspect-ratio: 210 / 297; margin: 0 auto; background: #fff; border-radius: 4px; box-shadow: 0 24px 60px rgba(0,0,0,.28), 0 0 0 1px rgba(0,0,0,.06); overflow: hidden; }
.rs-sheet img { display: block; width: 100%; height: 100%; object-fit: contain; }
.rs-sheet iframe { display: block; width: 100%; height: 100%; border: 0; }
@media (max-width: 760px) { .rs-stage { padding: 16px 12px 28px; } .rs-actions .btn span { display: none; } }

/* ---------- Clawd Run (game) ---------- */
.win-body.is-game { padding: 0; overflow: hidden; position: relative; background: #1b0838; }
.rn { position: relative; width: 100%; height: 100%; color: #fff; user-select: none; -webkit-user-select: none; font-variant-numeric: tabular-nums; }
.rn-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.rn kbd { font: 800 11px var(--font); min-width: 20px; height: 20px; display: inline-grid; place-items: center; padding: 0 5px; border-radius: 6px; background: rgba(255,255,255,.16); box-shadow: inset 0 -2px 0 rgba(0,0,0,.25); margin-right: 3px; }

/* red edges while the bug is close */
.rn-vignette { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .35s; box-shadow: inset 0 0 80px 10px rgba(255,40,90,.55); }
.rn.is-chased .rn-vignette { opacity: 1; animation: rnPulse .6s ease-in-out infinite alternate; }
@keyframes rnPulse { to { box-shadow: inset 0 0 120px 20px rgba(255,40,90,.7); } }

/* HUD */
.rn-hud { position: absolute; inset: 14px 16px auto; display: flex; justify-content: space-between; align-items: flex-start; pointer-events: none; opacity: 0; transform: translateY(-8px); transition: opacity .3s, transform .3s; }
.rn.is-running .rn-hud { opacity: 1; transform: none; }
.rn-hud-l, .rn-hud-r { display: flex; gap: 10px; align-items: flex-start; }
.rn-hud-l { flex-direction: column; }
.rn-chip { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px 0 10px; border-radius: 14px; background: rgba(20,8,40,.5); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: inset 0 0 0 1px rgba(255,255,255,.14), 0 6px 18px rgba(0,0,0,.25); }
.rn-chip b { font-size: 21px; font-weight: 900; letter-spacing: -.01em; text-shadow: 0 2px 0 rgba(0,0,0,.25); }
.rn-tok, .rn-statgrid .rn-tok { width: 18px; height: 24px; background: linear-gradient(160deg, #ffe0a0, #ff8a3c); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); filter: drop-shadow(0 0 6px rgba(255,160,80,.8)); }
.rn-tokens.pop b { animation: rnPop .28s cubic-bezier(.2,1.6,.4,1); }
@keyframes rnPop { 40% { transform: scale(1.4); color: #ffd27a; } }
.rn-powers { display: flex; gap: 8px; }
.rn-pow { --p: 1; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(#ffd27a calc(var(--p) * 1turn), rgba(255,255,255,.14) 0); box-shadow: 0 6px 18px rgba(0,0,0,.25); animation: rnIn .35s cubic-bezier(.2,1.5,.4,1); }
.rn-pow i { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: #24113f; font: 900 13px var(--font); font-style: normal; color: #ffd23f; }
.rn-pow[data-kind="magnet"] i::before { content: ""; width: 16px; height: 16px; border-radius: 50%; background: radial-gradient(circle at 50% 75%, transparent 32%, #ff3355 34%, #ff3355 64%, transparent 66%); clip-path: inset(0 0 25% 0); transform: rotate(180deg); }
.rn-scorebox { padding: 6px 14px 7px; border-radius: 14px; background: rgba(20,8,40,.45); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: inset 0 0 0 1px rgba(255,255,255,.14), 0 6px 18px rgba(0,0,0,.2); text-align: right; text-shadow: 0 2px 0 rgba(0,0,0,.3), 0 0 18px rgba(255,80,160,.45); }
.rn-score { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.rn-score b { font-size: 34px; font-weight: 900; letter-spacing: -.03em; line-height: 1; }
.rn-dist { font-size: 13px; font-weight: 700; opacity: .8; margin-top: 3px; }
.rn-dist b { font-weight: 900; }
.rn-mult { font-style: normal; font-size: 13px; font-weight: 900; color: #2a0b2e; background: #ffd23f; padding: 3px 7px; border-radius: 8px; text-shadow: none; animation: rnIn .35s cubic-bezier(.2,1.5,.4,1); }
.rn-round { pointer-events: auto; width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; gap: 4px; background: rgba(20,8,40,.5); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: inset 0 0 0 1px rgba(255,255,255,.14); }
.rn-round span { width: 4px; height: 14px; border-radius: 2px; background: #fff; }
.rn-round:hover { background: rgba(40,16,70,.65); }
@keyframes rnIn { from { transform: scale(.4); opacity: 0; } }

/* pop-up messages */
.rn-toasts { position: absolute; left: 0; right: 0; top: 28%; display: grid; place-items: center; pointer-events: none; }
.rn-toast { grid-area: 1 / 1; font-size: clamp(24px, 4vw, 40px); font-weight: 900; letter-spacing: -.02em; text-transform: uppercase; color: #fff; -webkit-text-stroke: 1.5px rgba(42,11,46,.6); text-shadow: 0 4px 0 rgba(42,11,46,.55), 0 0 26px rgba(255,120,180,.7); animation: rnToast 1.5s cubic-bezier(.2,1.4,.4,1) forwards; }
.rn-toast.power { color: #ffd27a; }
.rn-toast.best { color: #7af0ff; }
.rn-toast.warn { color: #ff6a8a; }
@keyframes rnToast { 0% { transform: scale(.3) rotate(-6deg); opacity: 0; } 18% { transform: scale(1.1) rotate(2deg); opacity: 1; } 30% { transform: scale(1) rotate(0); } 75% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(-30px); } }

/* sheets */
.rn-sheet { position: absolute; inset: 0; display: grid; place-items: center; padding: 20px; background: radial-gradient(120% 80% at 50% 60%, rgba(27,8,56,.2), rgba(27,8,56,.65)); backdrop-filter: blur(2px); }
.rn-start { background: linear-gradient(180deg, rgba(27,8,56,.55) 0%, rgba(27,8,56,0) 38%, rgba(27,8,56,0) 62%, rgba(27,8,56,.65) 100%); backdrop-filter: none; grid-template-rows: auto 1fr auto; place-items: initial; justify-items: center; padding: 6% 20px 5%; }
.rn-title { text-align: center; animation: rnDrop .6s cubic-bezier(.2,1.4,.4,1); }
.rn-logo { display: flex; flex-direction: column; align-items: center; line-height: .82; font-weight: 900; text-transform: uppercase; letter-spacing: -.04em; transform: rotate(-3deg); }
.rn-logo span { font-size: clamp(44px, 8vw, 84px); background: linear-gradient(180deg, #fff6c8 0%, #ffd27a 40%, #ff7a59 70%, #ff3f8e 100%); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 4px 0 #2a0b2e) drop-shadow(0 0 24px rgba(255,90,160,.55)); }
.rn-logo span + span { font-size: clamp(36px, 6.4vw, 68px); background: linear-gradient(180deg, #c8fbff, #3ff3ff 55%, #2a8cff); -webkit-background-clip: text; background-clip: text; margin-left: 1.2em; }
.rn-title p { margin: 14px 0 0; font-size: 15px; font-weight: 600; color: rgba(255,255,255,.85); text-shadow: 0 2px 8px rgba(0,0,0,.4); }
.rn-cta { grid-row: 3; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.rn-cta .rn-btn { width: auto; padding: 0 34px; animation: rnBreathe 1.6s ease-in-out infinite; }
@keyframes rnBreathe { 50% { transform: scale(1.06); } }
@keyframes rnDrop { from { transform: translateY(-30px) scale(.8); opacity: 0; } }
.rn-keys { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; font-size: 12px; font-weight: 600; color: rgba(255,255,255,.75); }
.rn-best { font-size: 13px; font-weight: 700; color: rgba(255,255,255,.7); }
.rn-best b { color: #ffd27a; font-weight: 900; }
.rn-btn { width: 100%; height: 50px; border-radius: 16px; font-weight: 900; font-size: 17px; letter-spacing: .01em; color: #2a0b2e; background: linear-gradient(180deg, #ffe08a, #ff8a5c); box-shadow: 0 5px 0 #b8453a, 0 12px 28px rgba(255,120,90,.4); transition: transform .12s, box-shadow .12s; }
.rn-btn:hover { transform: translateY(-1px); }
.rn-btn:active { transform: translateY(4px); box-shadow: 0 1px 0 #b8453a, 0 6px 16px rgba(255,120,90,.35); }
.rn-btn.ghost { margin-top: 10px; height: 44px; background: rgba(255,255,255,.12); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.16); }
.rn-card { width: min(360px, 100%); text-align: center; padding: 24px 22px 18px; border-radius: 28px; background: linear-gradient(180deg, rgba(48,18,84,.85), rgba(24,10,44,.9)); backdrop-filter: blur(20px) saturate(160%); -webkit-backdrop-filter: blur(20px) saturate(160%); box-shadow: 0 24px 60px rgba(0,0,0,.45), inset 0 0 0 1px rgba(255,255,255,.14), inset 0 1px 0 rgba(255,255,255,.2); }
.rn-sheet:not([hidden]) .rn-card { animation: rnCard .45s cubic-bezier(.2,1.4,.4,1); }
@keyframes rnCard { from { transform: translateY(30px) scale(.85); opacity: 0; } }
.rn-reason { font-size: 30px; font-weight: 900; letter-spacing: -.02em; text-transform: uppercase; color: #ff6a8a; text-shadow: 0 3px 0 rgba(0,0,0,.3); transform: rotate(-2deg); }
.rn-sub { margin: 4px 0 16px; font-size: 14px; color: rgba(255,255,255,.7); }
.rn-final { font-size: 64px; font-weight: 900; letter-spacing: -.04em; line-height: 1; margin: 8px 0 4px; background: linear-gradient(180deg, #fff, #ffd27a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.rn-newbest { display: inline-block; margin: 4px 0 2px; font-size: 12px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; color: #2a0b2e; background: #7af0ff; padding: 4px 10px; border-radius: 999px; animation: rnIn .5s cubic-bezier(.2,1.6,.4,1) .3s both; }
.rn-statgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0 16px; }
.rn-statgrid div { padding: 10px 4px; border-radius: 14px; background: rgba(255,255,255,.07); display: flex; flex-direction: column; gap: 2px; }
.rn-statgrid b { font-size: 20px; font-weight: 900; }
.rn-statgrid span { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: rgba(255,255,255,.6); }
.rn-hint { margin-top: 10px; font-size: 12px; color: rgba(255,255,255,.5); }
@media (max-width: 520px) { .rn-score b { font-size: 26px; } .rn-chip { height: 34px; } .rn-chip b { font-size: 17px; } .rn-keys { display: none; } }

/* home widget page for the game */
.wgm { justify-content: flex-end; gap: 6px; padding-right: clamp(26px, 2.4vw, 30px); color: #fff; background: linear-gradient(160deg, #2a0b4d 0%, #c2338a 60%, #ff7a59 100%); }
.wgm-art { position: absolute; right: -6%; top: -8%; width: 62%; aspect-ratio: 1; border-radius: 22%; transform: rotate(8deg); box-shadow: 0 14px 30px rgba(0,0,0,.3); }
.wgm-id { display: flex; flex-direction: column; gap: 2px; position: relative; }
.wgm-kicker { font-size: 10.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; opacity: .8; }
.wgm-id b { font-size: clamp(17px, 1.7vw, 22px); font-weight: 850; letter-spacing: -.02em; }
.wgm-id span:last-child { font-size: 12px; opacity: .85; }
.wgm-play { position: relative; align-self: flex-start; margin-top: 6px; font-size: 13px; font-weight: 800; padding: 5px 16px; border-radius: 999px; background: rgba(255,255,255,.24); backdrop-filter: blur(10px); }

/* ---------- doodled "tap the iPad" hint ---------- */
.doodle { position: fixed; left: 0; top: 0; z-index: 40; pointer-events: none; color: #fff7e8; opacity: 0; transition: opacity .5s; filter: drop-shadow(0 2px 0 rgba(60,10,50,.35)) drop-shadow(0 0 14px rgba(255,170,120,.45)); }
.doodle.is-on { opacity: 1; }
/* anchored at the iPad's top-left corner, the drawing sits above and to the left of it */
.doodle-text { position: absolute; right: 38px; bottom: 96px; white-space: nowrap; font: 700 clamp(26px, 2.6vw, 40px)/1 "Caveat", "Comic Sans MS", cursive; transform: rotate(-8deg); transform-origin: right bottom; }
.doodle.is-on .doodle-text { animation: dWrite .7s steps(14, end) .1s both, dBob 2.4s ease-in-out 1s infinite; clip-path: inset(0 0 0 0); }
.doodle-arrow { position: absolute; right: -18px; bottom: -6px; width: clamp(110px, 10vw, 160px); transform: scaleX(-1) rotate(4deg); overflow: visible; }
.doodle-arrow path { stroke-dasharray: 1; stroke-dashoffset: 1; }
.doodle.is-on .d1 { animation: dDraw .9s cubic-bezier(.5,0,.3,1) .6s forwards, dWiggle 2.4s ease-in-out 1.6s infinite; }
.doodle.is-on .d2 { animation: dDraw .3s ease-out 1.45s forwards; }
.doodle-spark { position: absolute; right: -40px; bottom: -30px; width: 30px; opacity: 0; }
.doodle.is-on .doodle-spark { animation: dSpark 1.2s ease-out 1.7s infinite; }
@keyframes dDraw { to { stroke-dashoffset: 0; } }
@keyframes dWrite { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes dBob { 50% { transform: rotate(-6deg) translateY(-5px); } }
@keyframes dWiggle { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-3px, 3px); } }
@keyframes dSpark { 0% { opacity: 0; transform: scale(.4) rotate(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: scale(1.3) rotate(45deg); } }
@media (prefers-reduced-motion: reduce) { .doodle.is-on * { animation: none !important; stroke-dashoffset: 0 !important; opacity: 1; } }
