/* tetoravr
   - 共通（色・文字・ボタン・上のバー・島のラベル・島の時計）
   - 島のページ（.page-island：/apps/ /profile/ 404）
   - ホーム（.page-home：/）                                  */

:root {
  --font: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Hiragino Sans", "Yu Gothic UI", "Meiryo", system-ui, sans-serif;
  --font-latin: "Outfit", var(--font);
  --ink: #1c2633;
  --ink-2: #465265;
  --ink-3: #6b7789;
  --paper: rgba(255, 252, 246, 0.84);
  --paper-strong: rgba(255, 252, 246, 0.95);
  --line: rgba(28, 38, 51, 0.12);
  --chip: rgba(28, 38, 51, 0.06);
  --primary: #1f2d44;
  --primary-ink: #fffcf6;
  --brand: #3b8be8;
  --page: #f4f7fb;
  --card: #ffffff;
  --shadow: 0 18px 40px -14px rgba(25, 40, 80, 0.38), 0 2px 8px rgba(25, 40, 80, 0.10);
  --radius: 22px;
  --gutter: clamp(12px, 2.2vw, 22px);
  --side: clamp(16px, 4vw, 40px);
  --bar: 44px;
  color-scheme: light;
}

/* 島のページは、島の時間が夜になると暗い色に */
.page-island[data-time="night"] {
  --ink: #eef1ff;
  --ink-2: #c6cde8;
  --ink-3: #98a2c6;
  --paper: rgba(16, 21, 44, 0.76);
  --paper-strong: rgba(16, 21, 44, 0.92);
  --line: rgba(255, 255, 255, 0.14);
  --chip: rgba(255, 255, 255, 0.08);
  --primary: #ffd27a;           /* 夜は窓あかりの色 */
  --primary-ink: #1b1f33;
  --brand: #8fd3ff;
  --shadow: 0 18px 40px -14px rgba(0, 0, 0, 0.65), 0 2px 8px rgba(0, 0, 0, 0.3);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.tetra { width: 1em; height: 1em; display: block; }

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-8px) rotate(8deg); }
}

/* ---------- 上のバー ---------- */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: calc(var(--gutter) + env(safe-area-inset-top)) var(--gutter) 0;
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }
.brand,
.clock,
.nav {
  background: var(--paper);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  backdrop-filter: blur(14px) saturate(1.3);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 999px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: var(--bar);
  padding: 0 18px 0 13px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-latin);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.01em;
}
.brand .tetra { width: 22px; height: 22px; color: var(--brand); }
.nav {
  margin-left: auto;
  display: flex;
  gap: 2px;
  padding: 4px;
  height: var(--bar);
}
.nav a {
  display: inline-flex;
  align-items: center;
  padding: 0 16px;
  border-radius: 999px;
  color: var(--ink-2);
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  transition: background 0.2s, color 0.2s;
}
.nav a:hover { background: var(--chip); color: var(--ink); }
.nav a[aria-current] { background: var(--primary); color: var(--primary-ink); }

/* ---------- ボタン ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper-strong);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.2s;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.04); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--primary); color: var(--primary-ink); border-color: transparent; }
.btn .count { padding: 2px 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.16); font-size: 12px; }
.btn-small { min-height: 36px; padding: 0 14px; font-size: 13px; }

/* ---------- 島の時計 ---------- */
.clock {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: var(--bar);
  padding: 0 15px 0 13px;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}
.clock-time { font-family: var(--font-latin); font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.clock-season { font-size: 12px; color: var(--ink-3); }
.clock-icon { position: relative; width: 14px; height: 14px; border-radius: 50%; }
.clock-icon[data-icon="sun"] { background: #ffb547; box-shadow: 0 0 0 3px rgba(255, 181, 71, 0.25); }
.clock-icon[data-icon="moon"] { box-shadow: inset -4px -1px 0 0 #ffd36b; transform: rotate(-20deg); }
.clock.is-overridden { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand), var(--shadow); }

.timepop {
  position: fixed;
  z-index: 30;
  top: calc(var(--gutter) + var(--bar) + 10px + env(safe-area-inset-top));
  left: var(--gutter);
  width: min(310px, calc(100vw - 2 * var(--gutter)));
  padding: 16px 16px 14px;
  border-radius: 18px;
  background: var(--paper-strong);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  color: var(--ink);
  animation: rise 0.25s ease both;
}
.timepop-title { margin: 0 0 6px; font-size: 12px; font-weight: 700; color: var(--ink-3); letter-spacing: 0.06em; }
.timepop-row { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.timepop input[type="range"] { flex: 1; accent-color: var(--primary); }
.timepop output { min-width: 3.2em; font-family: var(--font-latin); font-weight: 700; font-variant-numeric: tabular-nums; }
.season-chips { display: flex; gap: 6px; margin-bottom: 12px; }
.season-chips button {
  flex: 1;
  height: 36px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}
.season-chips button[aria-pressed="true"] { background: var(--primary); color: var(--primary-ink); border-color: transparent; }
.timepop-note { margin: 0 0 10px; font-size: 12px; color: var(--ink-3); }

/* ---------- 島のうえのラベル ---------- */
.labels { overflow: hidden; pointer-events: none; }
.label {
  position: absolute;
  left: 0;
  top: 0;
  translate: -50% calc(-100% - 8px);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 4px 11px 4px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper-strong);
  color: var(--ink);
  box-shadow: 0 8px 18px -8px rgba(20, 30, 60, 0.55);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
  white-space: nowrap;
  transition: opacity 0.2s, padding 0.2s, font-size 0.2s;
  will-change: transform;
}
button.label { pointer-events: auto; cursor: pointer; }
.label::before { content: ""; width: 8px; height: 8px; border-radius: 3px; background: var(--c, var(--brand)); }
.label.is-place::before { border-radius: 50%; background: #ff8a5c; }
.label.is-active { padding: 6px 13px 6px 11px; font-size: 14px; }

/* ---------- 共通の中身 ---------- */
.eyebrow { margin: 0 0 8px; font-size: 12px; color: var(--ink-3); letter-spacing: 0.04em; }
.lead { margin: 0 0 18px; font-size: 14px; line-height: 1.9; color: var(--ink-2); }
.sub { margin: 4px 0 0; font-size: 13px; color: var(--ink-3); }
.dot { display: inline-block; width: 10px; height: 10px; margin-right: 8px; border-radius: 3px; background: var(--c); vertical-align: -1px; }
.avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: linear-gradient(135deg, #9adcff, #3b8be8);
  color: #fff;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.12);
}
.avatar .tetra { width: 36px; height: 36px; }
.bio p { margin: 14px 0 0; font-size: 14px; line-height: 1.95; color: var(--ink-2); }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 0; padding: 0; }
.chips li { padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line); font-size: 13px; }
.contact { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.contact-note { margin: 0; font-size: 13px; color: var(--ink-3); }

/* =========================================================
   島のページ（/apps/ /profile/ 404）
   ========================================================= */
.page-island {
  overflow: hidden;
  background: linear-gradient(180deg, #4b9bef 0%, #a9d3fb 55%, #e7f2ff 100%);
}
.page-island[data-time="night"].no-world { background: linear-gradient(180deg, #070c22 0%, #172149 60%, #2b3166 100%); }
.page-island #world {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  outline: none;
}
.no-world #world { display: none; }
.page-island .labels { position: fixed; inset: 0; z-index: 12; }

/* 読み込み中 */
.loader {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: radial-gradient(120% 90% at 50% 40%, #a9d3fb 0%, #5aa2ec 60%, #3a7fd0 100%);
  color: #fff;
  transition: opacity 0.8s ease, visibility 0.8s;
}
html:not(.js) .loader { display: none; }
.loader.is-done { opacity: 0; visibility: hidden; }
.loader-inner { display: grid; justify-items: center; gap: 14px; }
.loader .tetra { width: 54px; height: 54px; animation: float 2.4s ease-in-out infinite; }
.loader p { margin: 0; font-size: 14px; letter-spacing: 0.18em; opacity: 0.9; }

/* JS が動かないときの、ふつうのページ */
.static {
  position: relative;
  max-width: 680px;
  margin: 48px auto;
  padding: 32px 28px;
  border-radius: var(--radius);
  background: rgba(255, 252, 246, 0.94);
  box-shadow: var(--shadow);
  line-height: 1.9;
}
html.js .static { display: none; }
.static h1 { font-family: var(--font-latin); margin: 0 0 4px; }
.static a { color: #2a6fc4; }
html:not(.js) .page-island { overflow: auto; }

/* パネル（作品・プロフィール） */
.sheet {
  position: fixed;
  z-index: 15;
  overflow: auto;
  overscroll-behavior: contain;
  color: var(--ink);
  background: var(--paper);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  backdrop-filter: blur(16px) saturate(1.3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  scrollbar-width: thin;
}
.sheet--apps,
.sheet--profile {
  right: var(--gutter);
  top: calc(var(--gutter) * 2 + var(--bar) + env(safe-area-inset-top));
  bottom: calc(var(--gutter) + env(safe-area-inset-bottom));
  width: min(390px, calc(100vw - 2 * var(--gutter)));
}
.sheet--lost {
  left: 50%;
  bottom: calc(var(--gutter) * 2 + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(460px, calc(100vw - 2 * var(--gutter)));
  text-align: center;
}
.sheet--lost .actions { justify-content: center; }
.sheet-inner { padding: 24px 24px 26px; animation: rise 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.page-island[data-time="night"] .btn .count { background: rgba(0, 0, 0, 0.12); }

/* 作品一覧 */
.panel-head h1, .panel-profile h1 { margin: 0; font-size: 26px; line-height: 1.3; }
.app-list { list-style: none; margin: 16px -10px 0; padding: 0; display: grid; gap: 2px; }
.app-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s;
}
.app-item:hover, .app-item:focus-visible { background: var(--chip); }
.swatch {
  position: relative;
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 9px 9px 7px 7px;
  background: var(--c);
  box-shadow: inset 0 -7px 0 rgba(0, 0, 0, 0.14);
}
.swatch::after {
  content: "";
  position: absolute;
  left: 9px;
  top: 9px;
  width: 6px;
  height: 7px;
  border-radius: 2px;
  background: rgba(255, 246, 214, 0.9);
  box-shadow: 8px 0 0 rgba(255, 246, 214, 0.9);
}
.app-main { min-width: 0; }
.app-title { display: block; font-size: 15px; font-weight: 700; line-height: 1.4; }
.app-meta { display: block; margin-top: 2px; font-size: 12px; color: var(--ink-3); }
.badge { margin-left: auto; color: var(--c); font-size: 15px; }
.empty { margin-top: 18px; padding: 18px; border-radius: 16px; background: var(--chip); }
.empty-title { margin: 0 0 6px; font-weight: 700; }
.empty p { font-size: 13px; line-height: 1.8; color: var(--ink-2); }
.panel-foot { margin: 20px 0 0; font-size: 12px; color: var(--ink-3); }

/* 作品の詳細 */
.back {
  margin: -6px 0 12px;
  padding: 6px 0;
  border: 0;
  background: none;
  color: var(--ink-2);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.detail-title { margin: 2px 0 10px; font-size: 27px; line-height: 1.35; }
.detail-desc { margin: 0 0 12px; font-size: 14px; line-height: 1.9; color: var(--ink-2); white-space: pre-wrap; }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 20px; padding: 0; }
.tags li { padding: 3px 10px; border-radius: 999px; background: var(--chip); color: var(--ink-2); font-size: 12px; }
.btn-enter { width: 100%; min-height: 54px; font-size: 16px; box-shadow: inset 0 -3px 0 color-mix(in srgb, var(--c) 70%, transparent); }
.visited-note { margin: 10px 0 0; font-size: 12px; color: var(--ink-3); text-align: center; }
.pager { display: flex; justify-content: space-between; margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--line); }
.pager button { padding: 8px 0; border: 0; background: none; color: var(--ink-2); font: inherit; font-size: 13px; cursor: pointer; }
.pager button:hover { color: var(--ink); }

/* プロフィール */
.profile-head { display: flex; align-items: center; gap: 14px; }
.profile-head h1 { font-family: var(--font-latin); }
.now { display: flex; gap: 10px; align-items: baseline; margin: 18px 0 0; padding: 10px 14px; border-radius: 14px; background: var(--chip); font-size: 14px; }
.now span { flex: none; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; color: var(--brand); }
.panel-profile h2 { margin: 26px 0 10px; font-size: 15px; scroll-margin-top: 16px; }
.card-lost h1 { margin: 0 0 8px; font-size: 26px; }

/* ひとことヒントとお知らせ */
.hint {
  position: fixed;
  left: var(--gutter);
  bottom: calc(var(--gutter) + env(safe-area-inset-bottom));
  z-index: 10;
  margin: 0;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(16, 24, 46, 0.42);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 12px;
  transition: opacity 0.6s;
  pointer-events: none;
}
.hint.is-off, .no-world .hint, [data-view="lost"] .hint { opacity: 0; }

.toast {
  position: fixed;
  left: 50%;
  top: calc(var(--gutter) * 2 + var(--bar) + env(safe-area-inset-top));
  z-index: 40;
  max-width: calc(100vw - 32px);
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--primary);
  color: var(--primary-ink);
  box-shadow: var(--shadow);
  font-size: 13px;
  font-weight: 700;
  opacity: 0;
  transform: translate(-50%, -8px);
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* 3D が使えないとき：パネルを中央に */
.no-world .sheet--apps,
.no-world .sheet--profile {
  right: 50%;
  transform: translateX(50%);
  width: min(560px, calc(100vw - 2 * var(--gutter)));
}
.no-world .panel-foot,
.no-world .timepop { display: none !important; }
.no-world .clock { pointer-events: none; }

/* スクリーンショット用（?shot） */
html.shot #ui, html.shot .loader { display: none !important; }

/* =========================================================
   ホーム（/）
   ========================================================= */
.page-home { background: var(--page); }

.home-hero {
  position: relative;
  padding: calc(var(--bar) + var(--gutter) + 40px) var(--side) 40px;
  background: linear-gradient(180deg, #b9dcff 0%, #d9ebff 48%, var(--page) 100%);
}
.hero-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
}
.hero-title {
  margin: 0;
  font-family: var(--font-latin);
  font-size: clamp(46px, 6.2vw, 80px);
  line-height: 0.95;
  letter-spacing: -0.02em;
}
.hero-tagline { margin: 16px 0 12px; font-size: clamp(19px, 2vw, 24px); font-weight: 700; }
.hero-lead { margin: 0 0 26px; max-width: 30em; font-size: 15.5px; line-height: 1.95; color: var(--ink-2); }
.hero-text .btn { min-height: 48px; padding: 0 22px; font-size: 15px; }
.hero-text .btn:not(.btn-primary) { background: var(--card); }

.hero-island { margin: 0; }
.island-frame {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 28px;
  background: linear-gradient(180deg, #8ec5f7 0%, #d6ebff 100%);
  box-shadow: 0 34px 60px -32px rgba(25, 50, 100, 0.6), inset 0 0 0 1px rgba(255, 255, 255, 0.5);
  isolation: isolate;
}
.island-frame canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; outline: none; }
.island-frame .labels { position: absolute; inset: 0; z-index: 2; }
.island-loading {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 12px;
  color: #fff;
  font-size: 13px;
  letter-spacing: 0.16em;
  transition: opacity 0.8s ease, visibility 0.8s;
}
.island-loading .tetra { width: 40px; height: 40px; animation: float 2.4s ease-in-out infinite; }
.island-frame.is-ready .island-loading { opacity: 0; visibility: hidden; }
.island-ui .clock { position: absolute; top: 12px; left: 12px; z-index: 4; height: 38px; font-size: 13px; }
.island-ui .timepop { position: absolute; top: 58px; left: 12px; width: min(300px, calc(100% - 24px)); }
.island-pop {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 5;
  width: min(330px, calc(100% - 24px));
  padding: 16px 18px 16px;
  border-radius: 18px;
  background: var(--paper-strong);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  animation: rise 0.3s ease both;
}
.pop-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.pop-close:hover { background: var(--chip); }
.pop-meta { margin: 0 0 4px; padding-right: 28px; font-size: 12px; color: var(--ink-3); }
.island-pop h3 { margin: 0 0 6px; font-size: 18px; line-height: 1.4; }
.pop-desc {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.8;
  color: var(--ink-2);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pop-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.island-caption {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 16px;
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-3);
}
.island-caption a { color: var(--ink); font-weight: 700; text-decoration: none; white-space: nowrap; }
.island-caption a:hover { text-decoration: underline; text-underline-offset: 4px; }
.page-home.no-world .island-frame { background: url("/assets/og.png") center / cover; }
.page-home.no-world .island-loading, .page-home.no-world .island-hint { display: none; }

/* セクション */
.home-section { max-width: 1180px; margin: 0 auto; padding: 48px var(--side); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.section-head h2 { margin: 0; font-size: clamp(24px, 2.6vw, 30px); line-height: 1.3; }
.section-head .more { flex: none; color: var(--ink); font-weight: 700; font-size: 14px; text-decoration: none; }
.section-head .more:hover { text-decoration: underline; text-underline-offset: 4px; }
.section-note { margin: -10px 0 20px; color: var(--ink-3); font-size: 14px; }

/* 作品カード */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 18px; }
.work-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--card);
  color: inherit;
  text-decoration: none;
  box-shadow: 0 14px 30px -22px rgba(25, 40, 80, 0.5);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.work-card:hover { transform: translateY(-3px); box-shadow: 0 22px 40px -22px rgba(25, 40, 80, 0.6); }
.work-card[data-flash]::after {
  content: attr(data-flash);
  position: absolute;
  left: 50%;
  top: 40%;
  transform: translate(-50%, -50%);
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--primary);
  color: var(--primary-ink);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.work-thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: color-mix(in srgb, var(--c) 22%, #ffffff);
}
.work-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* 絵が出せないときの、建物のシルエット */
.work-thumb:not(.has-img)::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 22%;
  width: 34%;
  height: 34%;
  transform: translateX(-50%);
  border-radius: 10px 10px 6px 6px;
  background: var(--c);
  box-shadow: inset 0 -10px 0 rgba(0, 0, 0, 0.14);
}
.work-no, .work-seen {
  position: absolute;
  top: 10px;
  z-index: 1;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  font-size: 11px;
  font-weight: 700;
}
.work-no { left: 10px; color: var(--ink-2); }
.work-seen { right: 10px; color: var(--c); }
.work-body { padding: 14px 16px 16px; }
.work-title { margin: 0 0 6px; font-size: 17px; line-height: 1.45; }
.work-title .ext { margin-left: 6px; font-size: 13px; color: var(--ink-3); }
.work-desc {
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 1.75;
  color: var(--ink-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.work-meta { margin: 0; font-size: 12px; color: var(--ink-3); }
.work-empty {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(180px, 280px) 1fr;
  gap: 24px;
  align-items: center;
  padding: 16px;
  border-radius: 22px;
  border: 1.5px dashed rgba(28, 38, 51, 0.2);
  background: var(--card);
}
.work-empty .work-thumb { border-radius: 14px; }
.work-empty h3 { margin: 0 0 8px; font-size: 18px; }
.work-empty p { margin: 0; font-size: 14px; line-height: 1.85; color: var(--ink-2); }

/* しくみ */
.points { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.points li { padding: 22px; border-radius: 20px; border: 1px solid var(--line); background: var(--card); }
.point-icon { display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 14px; border-radius: 14px; background: #e6f1ff; color: var(--brand); }
.point-icon svg { width: 26px; height: 26px; }
.points h3 { margin: 0 0 6px; font-size: 16px; }
.points p { margin: 0; font-size: 13.5px; line-height: 1.85; color: var(--ink-2); }

/* プロフィール */
.profile-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 22px;
  padding: 26px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: var(--card);
}
.profile-card .avatar { width: 76px; height: 76px; border-radius: 24px; }
.profile-card .avatar .tetra { width: 42px; height: 42px; }
.profile-main h3 { margin: 4px 0 0; font-family: var(--font-latin); font-size: 26px; }
.profile-main .bio p { margin-top: 10px; }
.profile-main h4 { margin: 22px 0 10px; font-size: 14px; scroll-margin-top: 90px; }
.profile-main .btn { background: var(--card); }
.profile-main .btn-primary { background: var(--primary); }

/* フッター */
.site-footer {
  max-width: 1180px;
  margin: 24px auto 0;
  padding: 28px var(--side) calc(40px + env(safe-area-inset-bottom));
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 28px;
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 13px;
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.site-footer a { color: var(--ink-2); text-decoration: none; font-weight: 700; }
.site-footer a:hover { color: var(--ink); }
.foot-brand { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-latin); }
.foot-brand .tetra { width: 18px; height: 18px; color: var(--brand); }
.site-footer p { margin: 0; }

/* ---------- スマートフォン ---------- */
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; }
  .home-hero { padding-bottom: 24px; }
  .island-frame { aspect-ratio: 10 / 9; border-radius: 24px; }
  .points { grid-template-columns: 1fr; }
  .work-empty { grid-template-columns: 1fr; }
}

@media (max-width: 759px) {
  :root { --bar: 42px; --gutter: 10px; }
  .brand { padding: 0 13px 0 11px; font-size: 16px; }
  .page-island .brand span { display: none; }
  .clock { padding: 0 12px 0 11px; }
  .nav a { padding: 0 13px; font-size: 13px; }
  .sheet--apps, .sheet--profile, .sheet--lost {
    left: 8px;
    right: 8px;
    top: auto;
    bottom: calc(8px + env(safe-area-inset-bottom));
    width: auto;
    max-height: 46vh;
    transform: none;
    border-radius: 24px;
  }
  .sheet--detail { max-height: 56vh; }
  .sheet-inner { padding: 20px 18px 22px; }
  .lead { font-size: 13px; line-height: 1.8; }
  .hint { left: 50%; transform: translateX(-50%); bottom: auto; top: calc(var(--gutter) * 2 + var(--bar) + env(safe-area-inset-top)); white-space: nowrap; font-size: 11px; }
  .timepop { left: 8px; }
  .hero-lead { font-size: 14.5px; line-height: 1.9; }
  .home-section { padding-top: 36px; padding-bottom: 36px; }
  .profile-card { grid-template-columns: 1fr; padding: 20px; }
}

@media (max-width: 380px) {
  .clock-season { display: none; }
  .nav a { padding: 0 10px; }
}

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

/* 右どなりに出すラベル（ポストなど） */
.label.is-right { translate: 10px -50%; }

/* =========================================================
   作品（/apps/）：アプリストアのような一覧と詳細
   ========================================================= */
.page-apps { background: #ffffff; --store-blue: #1a73e8; --hair: rgba(28, 38, 51, 0.1); }
.store { max-width: 1040px; margin: 0 auto; padding: calc(var(--bar) + var(--gutter) + 36px) var(--side) 32px; }
.store-head { margin-bottom: 24px; }
.store-eyebrow { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: 0.06em; color: var(--ink-3); }
.store-head h1 { margin: 2px 0 8px; font-size: clamp(34px, 4.4vw, 44px); line-height: 1.15; letter-spacing: -0.01em; }
.store-sub { margin: 0; max-width: 36em; color: var(--ink-2); font-size: 15px; line-height: 1.8; }

/* アイコン（角の丸い正方形） */
.app-icon {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  overflow: hidden;
  border-radius: 22%;
  background: linear-gradient(145deg, var(--c2, #9adcff), var(--c, #3b8be8));
  color: #fff;
  font-weight: 700;
  font-size: 28px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06), 0 6px 14px -8px rgba(20, 30, 60, 0.45);
}
.app-icon::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0) 55%); }
.app-icon img { width: 100%; height: 100%; object-fit: cover; }
.app-icon.is-lg { width: 120px; height: 120px; font-size: 54px; }
.app-icon.is-empty { --c: #c9d3df; --c2: #eef2f7; color: #8a96a6; }

/* 「開く」ボタン */
.get {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  height: 32px;
  padding: 0 16px;
  border-radius: 999px;
  background: #eef1f5;
  color: var(--store-blue);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
  transition: filter 0.15s;
}
.get:hover { filter: brightness(0.96); }
.get.is-primary { background: var(--store-blue); color: #fff; height: 36px; padding: 0 22px; }
.get.is-light { background: rgba(255, 255, 255, 0.92); }

/* 新着の大きなカード */
.feature {
  display: grid;
  gap: 6px;
  margin-bottom: 40px;
  padding: 28px 28px 22px;
  min-height: 300px;
  align-content: start;
  border-radius: 26px;
  background: linear-gradient(150deg, var(--c), var(--c2));
  color: #fff;
  text-decoration: none;
  box-shadow: 0 30px 50px -34px rgba(20, 30, 60, 0.7);
  transition: transform 0.25s ease;
}
.feature:hover { transform: scale(1.01); }
.feature-kicker { font-size: 13px; font-weight: 700; letter-spacing: 0.08em; opacity: 0.85; }
.feature-title { font-size: clamp(28px, 4vw, 40px); font-weight: 700; line-height: 1.2; }
.feature-text { max-width: 32em; font-size: 15px; line-height: 1.8; opacity: 0.92; }
.feature-bottom {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: auto;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.16);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.feature { grid-template-rows: auto auto auto 1fr; }
.feature-bottom .app-icon { width: 52px; height: 52px; font-size: 22px; }
.feature-meta { flex: 1; font-size: 12px; line-height: 1.6; opacity: 0.9; }

/* 一覧 */
.store-section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--hair); }
.store-section-head h2 { margin: 0; font-size: 22px; }
.store-section-head span { color: var(--ink-3); font-size: 14px; }
.store-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 8px; }
.store-chips button {
  height: 32px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: #eef1f5;
  color: var(--ink-2);
  font: inherit;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}
.store-chips button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.store-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; }
.store-row { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--hair); }
.row-link { flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; color: inherit; text-decoration: none; }
.row-text { min-width: 0; display: grid; gap: 1px; }
.row-title { font-size: 16px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-title .seen { margin-left: 6px; font-size: 12px; color: var(--store-blue); }
.row-sub { font-size: 13px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-meta { font-size: 12px; color: var(--ink-3); }
.store-empty { display: grid; justify-items: center; gap: 10px; padding: 56px 20px; border-radius: 26px; background: #f5f7fa; text-align: center; }
.store-empty h2 { margin: 8px 0 0; font-size: 20px; }
.store-empty p { margin: 0 0 8px; color: var(--ink-2); font-size: 14px; line-height: 1.8; }
.store-island { margin: 36px 0 0; text-align: center; }
.store-island a { color: var(--store-blue); font-weight: 700; text-decoration: none; }

/* 詳細 */
.store-back { display: inline-block; margin-bottom: 18px; color: var(--store-blue); font-weight: 700; text-decoration: none; font-size: 15px; }
.app-hero { display: flex; align-items: center; gap: 22px; padding-bottom: 22px; border-bottom: 1px solid var(--hair); }
.app-hero-text h1 { margin: 0; font-size: clamp(24px, 3.2vw, 32px); line-height: 1.25; }
.app-hero-sub { margin: 4px 0 14px; color: var(--ink-3); font-size: 15px; }
.app-hero-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ext-note { font-size: 12px; color: var(--ink-3); }
.app-facts { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); margin: 0; padding: 16px 0; border-bottom: 1px solid var(--hair); }
.app-facts div { padding: 0 12px; text-align: center; border-left: 1px solid var(--hair); }
.app-facts div:first-child { border-left: 0; }
.app-facts dt { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; color: var(--ink-3); }
.app-facts dd { margin: 4px 0 0; font-size: 16px; font-weight: 700; color: var(--ink-2); }
.detail-block { padding: 22px 0; border-bottom: 1px solid var(--hair); }
.detail-block h2 { margin: 0 0 12px; font-size: 20px; }
.app-desc { margin: 0; white-space: pre-wrap; font-size: 15px; line-height: 1.9; color: var(--ink); }
.shots { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; }
.shots img { height: 360px; max-width: 80vw; border-radius: 18px; border: 1px solid var(--hair); scroll-snap-align: start; object-fit: cover; }
.page-apps .site-footer { max-width: 1040px; }

@media (max-width: 720px) {
  .store-list { grid-template-columns: 1fr; }
  .feature { min-height: 260px; padding: 22px 20px 18px; }
  .app-icon.is-lg { width: 96px; height: 96px; font-size: 42px; }
  .app-hero { gap: 16px; }
  .shots img { height: 300px; }
}

@media (max-width: 560px) {
  .app-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 14px; }
  .app-facts div:nth-child(3n + 1) { border-left: 0; }
}
