/* ==========================================================================
   Eiki Ogawa Apps — 共通スタイル
   方向性: 最新の AWS マネジメントコンソール（Cloudscape）を参考にした、
   グレーがかった白基調のコンソール風レイアウト。
   ========================================================================== */

@view-transition { navigation: auto; }

:root {
  --bg: #f2f3f5;
  --bg-elev: #ffffff;
  --bg-sub: #f8f8fa;
  --bg-hover: #f0f1f4;
  --line: #e4e5ea;
  --line-strong: #c6c6cd;
  --text: #0f141a;
  --text-2: #424650;
  --text-3: #656871;
  --nav: #0f141a;
  --nav-line: #2a2f37;
  --nav-text: #e9ebed;
  --nav-text-2: #9ba7b6;
  --blue: #006ce0;
  --blue-hover: #004a9e;
  --blue-soft: #eef6ff;
  --blue-line: #b4d4f8;
  --green: #00802f;
  --green-soft: #effff1;
  --amber: #f2a100;
  --radius: 16px;
  --radius-lg: 20px;
  --radius-sm: 8px;
  --shadow: 0 1px 1px rgba(0, 7, 22, .05), 0 1px 6px rgba(0, 7, 22, .06);
  --shadow-hover: 0 2px 4px rgba(0, 7, 22, .06), 0 10px 28px rgba(0, 7, 22, .10);
  --topnav-h: 52px;
  --sidebar-w: 264px;
  --font: "Inter", "Noto Sans JP", "Hiragino Sans", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--topnav-h) + 64px); }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "palt" 1;
}
img { display: block; max-width: 100%; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-hover); text-decoration: underline; text-underline-offset: 3px; }
button { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
svg.i { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
svg.i.fill { fill: currentColor; stroke: none; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 6px; }

/* ---------- Top navigation ---------- */
.topnav {
  position: sticky; top: 0; z-index: 50;
  height: var(--topnav-h);
  display: flex; align-items: center; gap: 12px;
  padding: 0 16px;
  background: var(--nav);
  color: var(--nav-text);
  view-transition-name: topnav;
}
.topnav a { color: inherit; }
.topnav a:hover { text-decoration: none; }
.nav-menu-btn {
  display: none;
  width: 36px; height: 36px; border: 0; border-radius: 8px;
  background: transparent; cursor: pointer; place-items: center;
}
.nav-menu-btn:hover { background: #ffffff14; }
.nav-menu-btn svg.i { width: 20px; height: 20px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; }
.brand-mark {
  width: 28px; height: 28px; border-radius: 8px;
  display: grid; place-items: center;
  font-size: 13px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, #3b9cff 0%, #7a5cff 55%, #ff6fae 100%);
  box-shadow: inset 0 0 0 1px #ffffff2e;
}
.brand-sub { color: var(--nav-text-2); font-weight: 500; }
.nav-search { position: relative; flex: 1; max-width: 560px; margin: 0 auto; }
.nav-search input {
  width: 100%; height: 34px;
  padding: 0 44px 0 36px;
  border: 1px solid var(--nav-line); border-radius: 10px;
  background: #1b232d; color: var(--nav-text);
  font: inherit; font-size: 14px;
  transition: border-color .15s, background .15s;
}
.nav-search input::placeholder { color: var(--nav-text-2); }
.nav-search input:focus { outline: none; border-color: #539fe5; background: #222b36; }
.nav-search > svg.i { position: absolute; left: 12px; top: 9px; color: var(--nav-text-2); }
.nav-search kbd {
  position: absolute; right: 10px; top: 7px;
  font: 600 11px/18px var(--mono); padding: 0 6px;
  border: 1px solid var(--nav-line); border-radius: 5px; color: var(--nav-text-2);
}
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a { display: flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 8px; font-size: 14px; color: var(--nav-text); white-space: nowrap; }
.nav-links a:hover { background: #ffffff14; }
.nav-links a svg.i { width: 14px; height: 14px; color: var(--nav-text-2); }

.search-results {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  background: var(--bg-elev); color: var(--text);
  border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 7, 22, .22);
  padding: 6px; display: none; max-height: 70vh; overflow: auto;
}
.search-results.open { display: block; }
.search-results a { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 8px; color: var(--text); }
.search-results a:hover, .search-results a.active { background: var(--blue-soft); text-decoration: none; }
.search-results img { width: 32px; height: 32px; border-radius: 8px; }
.search-results .sr-name { font-weight: 600; font-size: 14px; line-height: 1.3; }
.search-results .sr-meta { font-size: 12px; color: var(--text-3); line-height: 1.3; }
.search-results .sr-empty { padding: 14px 12px; font-size: 14px; color: var(--text-3); }

/* ---------- Layout ---------- */
.layout { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: calc(100vh - var(--topnav-h)); }
.sidebar {
  position: sticky; top: var(--topnav-h);
  height: calc(100vh - var(--topnav-h));
  overflow-y: auto;
  background: var(--bg-elev);
  border-right: 1px solid var(--line);
  padding: 20px 12px 32px;
  view-transition-name: sidebar;
}
.sidebar-title { font-size: 17px; font-weight: 700; padding: 0 12px 14px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.side-group { margin: 14px 0 4px; padding: 0 12px; font-size: 12px; font-weight: 700; color: var(--text-3); letter-spacing: .04em; }
.side-link {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 12px; margin: 1px 0; border-radius: 10px;
  font-size: 14px; color: var(--text-2); line-height: 1.4;
}
.side-link:hover { background: var(--bg-hover); color: var(--text); text-decoration: none; }
.side-link.active { background: var(--blue-soft); color: var(--blue); font-weight: 600; }
.side-link img { width: 22px; height: 22px; border-radius: 6px; box-shadow: 0 0 0 1px rgba(0, 7, 22, .06); }
.side-link .soon-dot { margin-left: auto; font-size: 11px; color: var(--blue); font-weight: 600; }
.side-link svg.i { color: var(--text-3); }
.side-link.active svg.i { color: var(--blue); }
.side-sep { height: 1px; background: var(--line); margin: 14px 12px; }
.scrim { display: none; }

.main { min-width: 0; padding: 20px 32px 0; display: flex; flex-direction: column; }
.content { width: 100%; max-width: 1240px; margin: 0 auto; flex: 1; }
/* View Transitions 非対応ブラウザだけ、本文をふわっと出す */
@supports not (view-transition-name: none) { .content { animation: rise .5s var(--ease) both; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (max-width: 1080px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .nav-menu-btn { display: grid; }
  .sidebar {
    position: fixed; z-index: 60; left: 0; top: var(--topnav-h); bottom: 0; height: auto; width: min(300px, 86vw);
    transform: translateX(-102%); transition: transform .28s var(--ease);
    box-shadow: 8px 0 32px rgba(0, 7, 22, .18);
    view-transition-name: none;
  }
  body.nav-open .sidebar { transform: none; }
  .scrim { display: block; position: fixed; inset: var(--topnav-h) 0 0 0; z-index: 55; background: rgba(15, 20, 26, .35); opacity: 0; pointer-events: none; transition: opacity .2s; }
  body.nav-open .scrim { opacity: 1; pointer-events: auto; }
  .main { padding: 16px 24px 0; }
}
@media (max-width: 720px) {
  .nav-links { display: none; }
  .brand-sub, .nav-search kbd { display: none; }
  .main { padding: 12px 16px 0; }
}
@media (max-width: 420px) {
  .brand-name { display: none; }
}

/* ---------- Breadcrumb ---------- */
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: var(--text-3); margin-bottom: 16px; }
.breadcrumb a { color: var(--blue); }
.breadcrumb svg.i { width: 12px; height: 12px; color: var(--line-strong); }

/* ---------- Containers ---------- */
.container {
  background: var(--bg-elev);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}
.container-head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 20px;
  padding: 20px 24px 0;
}
.container-head h2 { font-size: 18px; font-weight: 700; line-height: 1.4; letter-spacing: -.01em; }
.container-head h2 .count { color: var(--text-3); font-weight: 400; margin-left: 4px; }
.container-head p { color: var(--text-3); font-size: 14px; margin-top: 2px; }
.container-body { padding: 18px 24px 24px; }
@media (max-width: 720px) {
  .container-head { padding: 16px 16px 0; }
  .container-body { padding: 14px 16px 18px; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 20px;
  border-radius: 999px; border: 2px solid var(--blue);
  font-size: 14px; font-weight: 700; letter-spacing: .01em; white-space: nowrap;
  background: var(--bg-elev); color: var(--blue); cursor: pointer;
  transition: background .15s, color .15s, border-color .15s, transform .15s;
}
.btn:hover { text-decoration: none; background: var(--blue-soft); color: var(--blue-hover); border-color: var(--blue-hover); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--blue); color: #fff; }
.btn.primary:hover { background: var(--blue-hover); border-color: var(--blue-hover); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--bg-hover); border-color: transparent; }
.btn[aria-disabled="true"] { border-color: var(--line-strong); background: var(--bg-sub); color: var(--text-3); cursor: default; }
.btn.lg { height: 44px; padding: 0 24px; font-size: 15px; }
.icon-btn {
  width: 36px; height: 36px; display: inline-grid; place-items: center;
  border-radius: 10px; border: 1px solid var(--line-strong); background: var(--bg-elev); cursor: pointer; color: var(--text-2);
}
.icon-btn:hover { background: var(--bg-hover); color: var(--text); }
.icon-btn:disabled { opacity: .35; cursor: default; }

/* ---------- Status / badges ---------- */
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.status svg.i { width: 15px; height: 15px; }
.status.live { color: var(--green); }
.status.soon { color: var(--blue); }
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  height: 22px; padding: 0 9px; border-radius: 999px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
  background: var(--bg-hover); color: var(--text-2);
}
.badge.blue { background: var(--blue-soft); color: var(--blue); }
.badge.dark { background: #ffffff1f; color: #fff; backdrop-filter: blur(8px); }
.rating { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; color: var(--text-2); white-space: nowrap; }
.rating svg.i { width: 14px; height: 14px; color: var(--amber); }
.rating .n { color: var(--text-3); font-weight: 400; }

.app-icon { border-radius: 22.5%; box-shadow: 0 0 0 1px rgba(0, 7, 22, .08), 0 4px 14px rgba(0, 7, 22, .10); background: #fff; }

/* ---------- Home: アイコンのレンガ壁（アプリ一覧） ---------- */
.brickwall {
  --t: 92px; --gap: 20px; --row-gap: 14px; --speed: 80s;
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: var(--row-gap);
  padding: 26px 0 28px;
  background:
    radial-gradient(55% 140% at 8% 0%, #e3eeff 0%, transparent 62%),
    radial-gradient(50% 140% at 95% 100%, #f3e6ff 0%, transparent 60%),
    radial-gradient(40% 120% at 55% 50%, #fff4e4 0%, transparent 70%),
    var(--bg-elev);
}
.brickwall::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(#0f141a14 1px, transparent 1px); background-size: 16px 16px;
}
.brick-row {
  position: relative; overflow: hidden; padding: 8px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%);
}
.brick-track { display: flex; gap: var(--gap); width: max-content; animation: brick-slide var(--speed) linear infinite; }
.brick-row.offset .brick-track { margin-left: calc((var(--t) + var(--gap)) / -2); }
.brickwall:hover .brick-track, .brickwall:focus-within .brick-track { animation-play-state: paused; }
@keyframes brick-slide { to { transform: translateX(calc(-50% - var(--gap) / 2)); } }
.tile { position: relative; flex: none; width: var(--t); height: var(--t); border-radius: 22.5%; }
.tile img { width: 100%; height: 100%; box-shadow: 0 0 0 1px rgba(0, 7, 22, .06), 0 6px 16px rgba(0, 7, 22, .12); transition: transform .3s var(--ease), box-shadow .3s; }
.tile:hover img, .tile:focus-visible img { transform: scale(1.07); box-shadow: 0 0 0 1px rgba(0, 7, 22, .06), 0 12px 26px rgba(0, 7, 22, .2); }
.tile-new {
  position: absolute; top: -6px; right: -6px;
  padding: 0 7px; border-radius: 999px; background: var(--blue); color: #fff;
  font: 800 10px/18px var(--font); letter-spacing: .04em; box-shadow: 0 0 0 2px #fff;
}
@media (max-width: 720px) {
  .brickwall { --t: 64px; --gap: 14px; --row-gap: 6px; padding: 16px 0 18px; }
  .tile-new { font-size: 9px; line-height: 16px; padding: 0 6px; top: -5px; right: -5px; }
}

.section-label { font-size: 13px; font-weight: 700; color: var(--text-3); letter-spacing: .04em; margin: 4px 4px 10px; }

/* ---------- Home: spotlight ---------- */
.spotlight { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-bottom: 20px; }
.spot {
  position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 300px; padding: 26px; border-radius: var(--radius); color: #fff; isolation: isolate;
  box-shadow: var(--shadow); transition: transform .3s var(--ease), box-shadow .3s;
}
.spot:hover { color: #fff; text-decoration: none; transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.spot-bg { position: absolute; inset: 0; z-index: -2; display: flex; }
.spot-bg img { flex: 1; min-width: 0; height: 100%; object-fit: cover; object-position: bottom; transition: transform .6s var(--ease); }
.spot:hover .spot-bg img { transform: scale(1.04); }
.spot::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(5, 10, 18, .05) 0%, rgba(5, 10, 18, .55) 50%, rgba(5, 10, 18, .9) 100%); }
.spot-head { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.spot-head img { width: 54px; height: 54px; }
.spot h3 { font-size: 24px; font-weight: 800; letter-spacing: -.01em; line-height: 1.25; }
.spot .spot-en { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: #ffffffb3; font-weight: 600; }
.spot p { color: #ffffffd9; font-size: 14px; max-width: 34em; }
.spot .spot-cta { margin-top: 16px; display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; }
.spot .spot-cta svg.i { transition: transform .2s; }
.spot:hover .spot-cta svg.i { transform: translateX(4px); }
.spot .badges { position: absolute; top: 20px; left: 26px; display: flex; gap: 6px; }
@media (max-width: 860px) {
  .spotlight { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -24px 20px; padding: 0 24px 4px; scroll-padding: 0 24px; scrollbar-width: none; }
  .spotlight::-webkit-scrollbar { display: none; }
  .spot { flex: 0 0 min(86%, 440px); scroll-snap-align: start; min-height: 228px; padding: 18px; }
  .spot .badges { top: 16px; left: 18px; }
  .spot h3 { font-size: 21px; }
  .spot p { font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .spot-head img { width: 46px; height: 46px; }
}
@media (max-width: 720px) { .spotlight { margin: 0 -16px 16px; padding: 0 16px 4px; scroll-padding: 0 16px; } }

/* ---------- Home: app list ---------- */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.segmented { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--bg-hover); border: 1px solid var(--line); }
.segmented button {
  border: 0; background: transparent; cursor: pointer;
  height: 30px; padding: 0 14px; border-radius: 9px; font-size: 13px; font-weight: 600; color: var(--text-2);
}
.segmented button:hover { color: var(--text); }
.segmented button[aria-pressed="true"] { background: var(--bg-elev); color: var(--text); box-shadow: 0 1px 3px rgba(0, 7, 22, .14); }
.segmented.icons button { padding: 0 9px; display: grid; place-items: center; }
.select {
  height: 36px; padding: 0 32px 0 12px; border-radius: 10px; border: 1px solid var(--line-strong);
  font: inherit; font-size: 13px; font-weight: 600; color: var(--text-2); background: var(--bg-elev) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23656871' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 11px center;
  appearance: none; cursor: pointer;
}

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 16px; }
.card {
  position: relative; display: flex; flex-direction: column; gap: 14px;
  padding: 20px; border-radius: 14px; background: var(--bg-elev);
  border: 1px solid var(--line); color: var(--text);
  transition: border-color .2s, box-shadow .25s, transform .25s var(--ease);
}
.card:hover { color: var(--text); text-decoration: none; border-color: var(--blue-line); box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.card-top { display: flex; align-items: center; gap: 14px; }
.card-top img { width: 60px; height: 60px; }
.card-name { font-size: 16px; font-weight: 700; line-height: 1.35; }
.card-cat { font-size: 12px; color: var(--text-3); line-height: 1.4; }
.card-sub { font-size: 14px; color: var(--text-2); line-height: 1.65; flex: 1; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.card-foot-l { display: inline-flex; align-items: center; gap: 14px; }
.card .go { color: var(--blue); display: inline-flex; transition: transform .2s; }
.card:hover .go { transform: translateX(3px); }
.card-shots { display: flex; gap: 6px; height: 92px; overflow: hidden; border-radius: 10px; background: var(--bg-sub); }
.card-shots img { height: 100%; width: auto; object-fit: cover; border-radius: 6px; }
.card-shots.land img { flex: 1; min-width: 0; }
.empty { padding: 40px 0; text-align: center; color: var(--text-3); }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
table.apps { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 760px; }
table.apps th { text-align: left; font-size: 12px; font-weight: 700; color: var(--text-3); padding: 10px 16px; background: var(--bg-sub); border-bottom: 1px solid var(--line); white-space: nowrap; }
table.apps td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; color: var(--text-2); }
table.apps tr:last-child td { border-bottom: 0; }
table.apps tbody tr { cursor: pointer; transition: background .15s; }
table.apps tbody tr:hover { background: var(--blue-soft); }
table.apps .t-app { display: flex; align-items: center; gap: 12px; color: var(--text); font-weight: 600; }
table.apps .t-app img { width: 32px; height: 32px; }

/* ---------- Home: about ---------- */
.about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
.about .container { margin-bottom: 20px; }
.about .container-body p { color: var(--text-2); font-size: 14px; }
.about .container-body p + p { margin-top: 8px; }
.about-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
@media (max-width: 860px) { .about { grid-template-columns: minmax(0, 1fr); gap: 0; } }

/* ---------- Detail: header ---------- */
.app-hero { position: relative; overflow: hidden; isolation: isolate; }
.app-hero-bg { position: absolute; inset: -40%; z-index: -1; background-size: cover; background-position: center; filter: blur(70px) saturate(1.5); opacity: .32; }
.app-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, #ffffffee 0%, #ffffffb8 55%, #ffffff66 100%); }
.app-hero-inner { display: flex; align-items: center; gap: 28px; padding: 32px; }
.app-hero-icon { width: 128px; height: 128px; flex: none; }
.app-hero-text { min-width: 0; flex: 1; }
.app-hero h1 { font-size: clamp(26px, 3vw, 36px); font-weight: 800; letter-spacing: -.02em; line-height: 1.25; }
.app-hero .en { font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--text-3); margin-bottom: 4px; }
.app-hero .sub { font-size: 16px; color: var(--text-2); margin-top: 6px; }
.app-hero .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 14px; }
.app-hero .meta .sep { width: 1px; height: 14px; background: var(--line-strong); }
.app-hero-actions { display: flex; flex-direction: column; gap: 10px; align-items: stretch; flex: none; }
.app-hero-actions .note { font-size: 12px; color: var(--text-3); text-align: center; }
@media (max-width: 860px) {
  .app-hero-inner { flex-wrap: wrap; padding: 24px; gap: 18px 20px; }
  .app-hero-icon { width: 96px; height: 96px; }
  .app-hero-text { flex-basis: calc(100% - 120px); }
  .app-hero-actions { flex-direction: row; flex-wrap: wrap; width: 100%; }
  .app-hero-actions .btn { flex: 1; }
  .app-hero-actions .note { width: 100%; }
}
@media (max-width: 520px) {
  .app-hero-inner { padding: 20px 16px; }
  .app-hero-icon { width: 76px; height: 76px; }
  .app-hero-text { flex-basis: calc(100% - 96px); }
  .app-hero .sub { font-size: 14px; }
}

@media (max-width: 560px) {
  .app-hero-inner { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 2px 14px; align-items: center; }
  .app-hero-icon { grid-row: 1 / 3; width: 72px; height: 72px; }
  .app-hero-text { display: contents; }
  .app-hero .en { grid-column: 2; align-self: end; margin: 0; font-size: 11px; }
  .app-hero h1 { grid-column: 2; align-self: start; font-size: 24px; }
  .app-hero .sub { grid-column: 1 / -1; margin-top: 12px; }
  .app-hero .meta { grid-column: 1 / -1; margin-top: 10px; gap: 6px 10px; }
  .app-hero-actions { grid-column: 1 / -1; margin-top: 14px; }
}

/* ---------- Detail: tabs ---------- */
.tabs {
  position: sticky; top: var(--topnav-h); z-index: 20;
  display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none;
  margin: 0 -32px 20px; padding: 0 32px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  position: relative; padding: 12px 14px; font-size: 14px; font-weight: 600; color: var(--text-2); white-space: nowrap;
}
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.active { color: var(--blue); }
.tabs a.active::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--blue); }
@media (max-width: 1080px) { .tabs { margin: 0 -24px 20px; padding: 0 24px; } }
@media (max-width: 720px) { .tabs { margin: 0 -16px 16px; padding: 0 16px; } }

/* ---------- Detail: screenshots ---------- */
.shots-wrap { position: relative; }
.shots {
  display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 24px;
  padding: 4px 24px 8px; scrollbar-width: thin;
}
.shots button {
  flex: none; padding: 0; border: 0; background: none; cursor: zoom-in; scroll-snap-align: start;
  border-radius: 14px; overflow: hidden; box-shadow: 0 0 0 1px rgba(0, 7, 22, .08), 0 6px 18px rgba(0, 7, 22, .10);
  transition: transform .25s var(--ease), box-shadow .25s;
}
.shots button:hover { transform: translateY(-3px); box-shadow: 0 0 0 1px rgba(0, 7, 22, .08), 0 14px 30px rgba(0, 7, 22, .16); }
.shots img { height: 460px; width: auto; }
.shots .land img { height: 300px; }
@media (max-width: 720px) {
  .shots { padding: 4px 16px 8px; scroll-padding: 0 16px; gap: 10px; }
  .shots img { height: 380px; }
  .shots .land img { height: auto; width: calc(100vw - 64px); }
}

/* ---------- Detail: overview ---------- */
.overview { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 32px; }
.overview .desc p { color: var(--text-2); font-size: 15px; line-height: 1.95; }
.overview .desc p + p { margin-top: 12px; }
.overview .desc p:first-child { color: var(--text); font-size: 17px; font-weight: 600; line-height: 1.8; }
.for-you { padding: 18px 20px; border-radius: 14px; background: var(--bg-sub); border: 1px solid var(--line); align-self: start; }
.for-you h3 { font-size: 13px; font-weight: 700; color: var(--text-3); margin-bottom: 10px; }
.for-you ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.for-you li { display: flex; gap: 10px; font-size: 14px; font-weight: 500; line-height: 1.6; }
.for-you li svg.i { margin-top: 3px; color: var(--accent, var(--green)); }
@media (max-width: 860px) { .overview { grid-template-columns: minmax(0, 1fr); gap: 20px; } }

/* ---------- Detail: features ---------- */
.features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.feature { display: flex; gap: 16px; padding: 18px; border-radius: 12px; border: 1px solid var(--line); transition: border-color .2s, background .2s; }
.feature:hover { border-color: var(--line-strong); background: var(--bg-sub); }
.feature .num {
  flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  font: 700 13px/1 var(--mono); color: var(--accent, var(--blue));
  background: color-mix(in srgb, var(--accent, var(--blue)) 12%, #fff);
}
.feature h3 { font-size: 15px; font-weight: 700; line-height: 1.5; }
.feature p { font-size: 14px; color: var(--text-2); margin-top: 4px; line-height: 1.75; }
@media (max-width: 720px) { .features { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Detail: 深海戦航（クルー・図鑑） ---------- */
.container.abyss {
  background: radial-gradient(120% 80% at 50% 0%, #0f2a3d 0%, #081723 55%, #050d15 100%);
  color: #e6f1f7; box-shadow: 0 1px 2px rgba(0, 7, 22, .2), 0 8px 24px rgba(0, 20, 40, .18);
}
.abyss .container-head p { color: #9db4c4; }
.crew { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.crew-card {
  display: flex; flex-direction: column; border-radius: 14px; overflow: hidden;
  background: linear-gradient(180deg, #ffffff0d, #ffffff05); border: 1px solid #ffffff17;
  transition: border-color .2s, transform .25s var(--ease);
}
.crew-card:hover { border-color: #5fd3e666; transform: translateY(-2px); }
.crew-art { display: grid; place-items: center; padding: 18px 18px 6px; background: radial-gradient(circle at 50% 55%, #2c8fb033, transparent 65%); }
.crew-art img { width: 132px; height: auto; transition: transform .4s var(--ease); }
.crew-card:hover .crew-art img { transform: scale(1.05); }
.crew-body { padding: 4px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.crew-body .role { align-self: flex-start; font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: #5fd3e61f; color: #7fe3f2; }
.crew-body h3 { font-size: 17px; font-weight: 800; margin-top: 8px; line-height: 1.35; }
.crew-name { font-size: 12px; color: #8fa8b8; }
.crew-desc { font-size: 13px; color: #c5d6e0; margin-top: 8px; line-height: 1.7; flex: 1; }
.skill { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: #00000040; border: 1px solid #ffffff12; font-size: 12px; line-height: 1.6; color: #b5c9d6; display: flex; flex-direction: column; }
.skill-label { font-size: 10px; font-weight: 700; letter-spacing: .08em; color: #6f8a9c; }
.skill b { color: #fff; font-size: 13px; }

.bestiary { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 12px; }
.beast { position: relative; padding: 14px 14px 16px; border-radius: 14px; background: #ffffff08; border: 1px solid #ffffff14; transition: border-color .2s, background .2s; }
.beast:hover { border-color: #7fb8ff55; background: #ffffff0d; }
.beast-no { position: absolute; top: 12px; left: 14px; font: 700 11px/1 var(--mono); color: #6f8a9c; }
.beast-art { aspect-ratio: 1; display: grid; place-items: center; margin: 4px 6px 10px; background: radial-gradient(circle, #3a7bd533 0%, transparent 62%); }
.beast-art img { width: 86%; height: 86%; object-fit: contain; filter: drop-shadow(0 0 18px #4aa8ff55); transition: transform .5s var(--ease); }
.beast:hover .beast-art img { transform: scale(1.06) rotate(-2deg); }
.beast h3 { font-size: 15px; font-weight: 800; line-height: 1.4; }
.beast p { font-size: 12px; color: #a9bfcd; line-height: 1.7; margin-top: 4px; }
.beast dl { margin: 10px 0 0; display: flex; flex-direction: column; gap: 6px; }
.beast dl div { display: flex; align-items: center; gap: 8px; }
.beast dt { font-size: 11px; font-weight: 700; color: #6f8a9c; width: 28px; flex: none; }
.beast dd { margin: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.dmg { font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: #ffffff14; color: #d7e3ea; }
.dmg.kin { background: #c9d3dc26; color: #e3eaf0; }
.dmg.thr { background: #ff8a3d2b; color: #ffb27d; }
.dmg.em { background: #a77bff2e; color: #c9adff; }
.dmg.son { background: #3dd6f02b; color: #8be9f7; }
.dmg.bio { background: #4fd18b2b; color: #8de8b5; }
.dmg.none { background: transparent; color: #6f8a9c; padding: 1px 0; }
.unknown-bar { display: flex; align-items: center; gap: 14px; margin-top: 12px; padding: 14px 16px; border-radius: 14px; border: 1px dashed #ffffff2b; }
.unknown-bar .q { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font: 800 20px/1 var(--font); color: #ffffff59; background: #ffffff0d; }
.unknown-bar b { font-size: 14px; }
.unknown-bar p { font-size: 13px; color: #9db4c4; }
@media (max-width: 1080px) { .crew { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  /* クルーは横スワイプのカルーセルに */
  .crew { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 0 16px 4px; scroll-padding: 0 16px; scrollbar-width: none; }
  .crew::-webkit-scrollbar { display: none; }
  .crew-card { flex: 0 0 74%; scroll-snap-align: start; }
  .bestiary { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .beast { padding: 10px 10px 12px; }
  .beast h3 { font-size: 14px; }
  .beast p { font-size: 11px; }
  .beast dt { width: 24px; }
}

/* ---------- Key-value pairs ---------- */
.kv { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 32px; }
.kv > div { min-width: 0; }
.kv .kv-value { font-weight: 500; font-size: 15px; word-break: break-word; }
.kv .kv-value a { display: inline-flex; align-items: center; gap: 4px; }
.kv .kv-value a svg.i { width: 13px; height: 13px; }
.kv-note { font-size: 12px; color: var(--text-3); margin-top: 16px; }
@media (max-width: 860px) { .kv { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 340px) { .kv { grid-template-columns: minmax(0, 1fr); gap: 14px; } }

/* ---------- Detail: pager & others ---------- */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
.pager a {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 14px;
  background: var(--bg-elev); box-shadow: var(--shadow); color: var(--text);
  transition: box-shadow .25s, transform .25s var(--ease);
}
.pager a:hover { text-decoration: none; box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.pager a.next { justify-content: flex-end; text-align: right; }
.pager img { width: 44px; height: 44px; }
.pager .dir { font-size: 12px; font-weight: 600; color: var(--text-3); }
.pager .nm { font-weight: 700; line-height: 1.4; }
.pager svg.i { color: var(--text-3); }
@media (max-width: 560px) { .pager { grid-template-columns: 1fr; } .pager img { width: 36px; height: 36px; } }

.mini-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(200px, 44%), 1fr)); gap: 10px; }
@media (max-width: 520px) { .mini { padding: 8px 10px; gap: 10px; } .mini img { width: 34px; height: 34px; } }
.mini {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); color: var(--text);
  transition: border-color .2s, background .2s;
}
.mini:hover { text-decoration: none; color: var(--text); border-color: var(--blue-line); background: var(--blue-soft); }
.mini img { width: 40px; height: 40px; }
.mini .nm { font-weight: 600; font-size: 14px; line-height: 1.35; }
.mini .ct { font-size: 12px; color: var(--text-3); line-height: 1.35; }

/* ---------- Lightbox ---------- */
.lightbox {
  border: 0; padding: 0; margin: 0; max-width: none; max-height: none; width: 100vw; height: 100dvh;
  background: rgba(10, 14, 20, .88); color: #fff;
}
.lightbox[open] { display: grid; grid-template-columns: 56px minmax(0, 1fr) 56px; align-items: center; animation: fadein .2s ease; }
.lightbox::backdrop { background: transparent; }
.lightbox figure { margin: 0; height: 100dvh; padding: 56px 0 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; min-width: 0; }
.lightbox img { max-width: 100%; max-height: calc(100dvh - 120px); object-fit: contain; border-radius: 14px; }
.lightbox figcaption { font-size: 14px; color: #ffffffcc; text-align: center; padding: 0 8px; }
.lightbox .lb-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: #ffffff1f; color: #fff; display: grid; place-items: center; cursor: pointer; margin: auto; }
.lightbox .lb-btn:hover { background: #ffffff33; }
.lightbox .lb-close { position: absolute; top: 12px; right: 12px; }
@keyframes fadein { from { opacity: 0; } }
@media (max-width: 560px) { .lightbox[open] { grid-template-columns: 40px minmax(0, 1fr) 40px; } .lightbox .lb-btn { width: 36px; height: 36px; } }

/* ---------- Flashbar (toast) ---------- */
.flash {
  position: fixed; left: 50%; top: calc(var(--topnav-h) + 12px); z-index: 80; transform: translate(-50%, -12px);
  display: flex; align-items: center; gap: 10px; padding: 10px 18px; border-radius: 12px;
  background: #00802f; color: #fff; font-size: 14px; font-weight: 600; box-shadow: 0 10px 30px rgba(0, 7, 22, .25);
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .25s var(--ease);
}
.flash.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Support ---------- */
.contact { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; }
.contact p { color: var(--text-2); font-size: 14px; }
.contact .mail { font: 600 14px var(--mono); color: var(--text); margin-top: 6px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:first-child { border-top: 0; }
.faq summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px;
  padding: 14px 0; font-weight: 600; font-size: 15px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg.i { color: var(--text-3); transition: transform .2s; }
.faq details[open] summary svg.i { transform: rotate(90deg); }
.faq .ans { padding: 0 0 16px 26px; color: var(--text-2); font-size: 14px; line-height: 1.85; }
.page-head { margin-bottom: 20px; }
.page-head h1 { font-size: clamp(24px, 2.6vw, 30px); font-weight: 800; letter-spacing: -.02em; line-height: 1.3; }
.page-head p { color: var(--text-3); margin-top: 4px; }

/* ---------- Footer ---------- */
.footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  margin-top: 24px; padding: 20px 0 28px; border-top: 1px solid var(--line);
  font-size: 13px; color: var(--text-3);
  width: 100%; max-width: 1240px; margin-left: auto; margin-right: auto;
}
.footer nav { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.footer a { color: var(--text-2); }
.footer .tm { width: 100%; font-size: 11px; opacity: .8; }

/* ---------- View transitions ---------- */
::view-transition-old(root) { animation: vt-out .18s ease both; }
::view-transition-new(root) { animation: vt-in .32s var(--ease) both; }
::view-transition-group(*) { animation-duration: .38s; animation-timing-function: var(--ease); }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(10px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  @view-transition { navigation: none; }
}
