:root {
  --ink: #0b2942;
  --muted: #607487;
  --sea: #0f6f9f;
  --sea2: #4bb9d8;
  --foam: #e8fbff;
  --accent: #ffb84d;
  --danger: #c33f49;
  --card: #ffffff;
  --bg: #eef7fb;
  --line: #d5e5ed;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--ink); }
body { font-size: 17px; line-height: 1.55; }
a { color: inherit; }
.topbar {
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:14px max(18px, env(safe-area-inset-left)); background:#07395a; color:white;
}
.brand { font-weight:800; text-decoration:none; letter-spacing:.02em; }
.version { font-size:12px; opacity:.75; }
.nav {
  display:flex; gap:16px; align-items:center; overflow-x:auto; white-space:nowrap;
  padding:10px 18px; background:#0b527b; color:#fff; font-weight:700; font-size:14px;
}
.nav a, .linkbutton { color:white; text-decoration:none; }
.linkbutton { border:0; background:none; padding:0; font:inherit; cursor:pointer; }
.inline { display:inline; margin:0; }
.container { width:min(980px, 100%); margin:0 auto; padding:22px 16px 40px; }
footer { padding:18px; text-align:center; font-size:13px; color:var(--muted); }
.hero {
  position:relative; overflow:hidden; display:flex; align-items:center; justify-content:space-between;
  background:linear-gradient(140deg,#0b527b,#1c9bc1); color:white; border-radius:22px; padding:28px;
  margin-bottom:20px; box-shadow:0 12px 28px rgba(17,75,105,.18);
}
.hero h1 { margin:.1em 0; font-size:clamp(30px,6vw,50px); }
.boat { font-size:68px; transform:rotate(-3deg); }
.eyebrow { margin:0 0 5px; text-transform:uppercase; letter-spacing:.14em; font-size:12px; font-weight:800; color:#2c7897; }
.hero .eyebrow { color:#b9efff; }
.grid { display:grid; gap:18px; }
.grid.two { grid-template-columns:repeat(2,minmax(0,1fr)); }
.card {
  background:var(--card); border:1px solid var(--line); border-radius:20px; padding:24px;
  box-shadow:0 8px 22px rgba(15,61,86,.07); margin-bottom:18px;
}
.card.accent { border-top:5px solid var(--accent); }
.card.narrow { width:min(560px,100%); margin-inline:auto; }
h1,h2,h3 { line-height:1.2; }
h1 { font-size:clamp(28px,5vw,42px); margin:.15em 0 .6em; }
h2 { margin-top:1.2em; }
label { display:block; font-weight:750; margin-bottom:15px; }
input, select {
  width:100%; margin-top:7px; padding:13px 14px; border:2px solid #c8dae4; border-radius:12px;
  background:white; color:var(--ink); font:inherit; min-height:50px;
}
input:focus, select:focus { outline:3px solid rgba(75,185,216,.28); border-color:#4bb9d8; }
button, .button {
  display:inline-flex; align-items:center; justify-content:center; min-height:48px; padding:12px 18px;
  border-radius:12px; border:2px solid #0b527b; background:white; color:#0b527b; font-weight:800;
  text-decoration:none; cursor:pointer; font-size:16px;
}
button.primary, .button.primary, .primary { background:#0b6f9f; color:white; border-color:#0b6f9f; }
.full { width:100%; }
.big { min-height:62px; font-size:20px; margin-top:6px; }
.help, .small-note { color:var(--muted); font-size:14px; }
.lead { color:#405b6e; font-size:18px; }
.error { background:#fff0f1; border:1px solid #f0aeb4; color:#8c202b; padding:12px 14px; border-radius:12px; margin:14px 0; }
.notice { background:#eef9ff; border-left:5px solid #48a9c8; padding:12px 14px; border-radius:10px; margin:14px 0; }
.game-hud {
  display:grid; grid-template-columns:1fr 1fr 1fr; gap:8px; background:#07395a; color:white;
  border-radius:16px; padding:10px; margin-bottom:8px; position:sticky; top:6px; z-index:20;
}
.game-hud div { text-align:center; padding:4px; }
.game-hud span { display:block; font-size:12px; opacity:.8; }
.game-hud strong { font-size:24px; }
.game-hud small { font-size:12px; margin-left:2px; }
.sea-stage {
  position:relative; height:min(54vh,430px); min-height:320px; overflow:hidden; border-radius:22px;
  background:linear-gradient(#8edaf0 0 47%, #177fae 47% 100%); border:1px solid #83c9de;
  touch-action:manipulation; user-select:none;
}
.sky { position:absolute; inset:0 0 53% 0; background:linear-gradient(#7fcff0,#dff9ff); }
.sun { position:absolute; right:8%; top:8%; font-size:42px; }
.boat-game { position:absolute; left:12%; top:38%; font-size:56px; z-index:4; filter:drop-shadow(0 4px 2px rgba(0,0,0,.15)); }
.wave {
  position:absolute; left:-10%; width:120%; height:34px; border-radius:50%; border-top:5px solid rgba(255,255,255,.7);
}
.wave1 { top:55%; animation:drift 5s linear infinite; }
.wave2 { top:72%; animation:drift 7s linear infinite reverse; opacity:.65; }
@keyframes drift { from { transform:translateX(-2%);} to {transform:translateX(2%);} }
.game-controls { display:grid; grid-template-columns:1fr auto; gap:12px; margin-top:12px; align-items:center; }
.hook-button {
  width:100%; min-height:78px; border:0; border-radius:18px; background:#ff9d2e; color:#382100;
  box-shadow:0 7px 0 #d57b11; font-size:28px; font-weight:950; touch-action:manipulation;
}
.hook-button:active { transform:translateY(4px); box-shadow:0 3px 0 #d57b11; }
.hook-button:disabled { opacity:.45; filter:grayscale(.4); }
.quit-button { min-height:56px; padding:10px 16px; border-radius:14px; border:2px solid #c6d8e2; background:#f7fbfd; color:#2b5166; font-weight:800; }
.result-pop {
  position:fixed; left:18px; top:18px; z-index:24;
  width:min(320px, calc(100vw - 32px));
  background:rgba(255,255,255,.96);
  border-radius:18px;
  padding:12px 12px 10px;
  box-shadow:0 10px 28px rgba(0,0,0,.18);
  border:2px solid #dceaf0;
  text-align:left;
  pointer-events:none;
}
.catch-toast-head { display:flex; align-items:center; gap:10px; }
.result-pop img { width:72px; height:56px; object-fit:contain; flex:0 0 auto; }
.result-pop h2 { margin:0 0 3px; font-size:20px; line-height:1.1; }
.result-pop .size { font-size:18px; font-weight:900; line-height:1.2; }
.result-pop .mini-note { margin:5px 0 0; font-size:12px; color:#536d7c; line-height:1.35; }
.result-pop .meta { font-size:12px; color:#5a7381; }
.badge { display:inline-block; padding:3px 8px; border-radius:999px; background:#ffebae; color:#594000; font-size:12px; font-weight:900; margin-bottom:6px; }

.stat-row { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin:18px 0; }
.stat-row div { background:#eef8fc; border-radius:14px; padding:14px 8px; text-align:center; }
.stat-row strong { display:block; font-size:26px; }
.stat-row span { color:var(--muted); font-size:13px; }
.catch-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.catch-card { display:flex; gap:12px; align-items:center; border:1px solid var(--line); border-radius:14px; padding:12px; }
.catch-card img { width:95px; height:70px; object-fit:contain; }
.catch-card h3 { margin:4px 0; }
.actions { display:flex; flex-wrap:wrap; gap:10px; margin-top:22px; }
table { width:100%; border-collapse:collapse; }
th,td { border-bottom:1px solid var(--line); padding:10px; text-align:left; }
.empty { padding:26px; text-align:center; color:var(--muted); background:#f6fafc; border-radius:14px; }

.inline-filter { max-width:300px; }
.ranking-list { display:grid; gap:8px; margin-top:16px; }
.rank-row { display:grid; grid-template-columns:50px 1fr auto; gap:12px; align-items:center; padding:12px; border:1px solid var(--line); border-radius:14px; }
.rank-no { width:42px; height:42px; display:grid; place-items:center; background:#e7f4f9; border-radius:50%; font-weight:900; }
.rank-row small { display:block; color:var(--muted); }
.rank-size { font-size:20px; font-weight:900; }

.fishbook-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.fishbook-card { border:1px solid var(--line); border-radius:16px; padding:14px; background:#fbfeff; }
.fishbook-card img { width:100%; height:120px; object-fit:contain; }
.fishbook-card.locked { filter:grayscale(1); opacity:.63; text-align:center; }
.silhouette { font-size:76px; filter:brightness(.2); }
.trivia { color:#536d7c; font-size:14px; }

@media (max-width: 700px) {
  body { font-size:16px; }
  .container { padding:14px 12px 32px; }
  .grid.two, .fishbook-grid, .catch-grid { grid-template-columns:1fr; }
  .card { padding:18px; border-radius:16px; }
  .hero { padding:22px 18px; }
  .boat { font-size:48px; }
  .nav { gap:14px; }
  .game-hud strong { font-size:20px; }
  .sea-stage { min-height:300px; height:45vh; }
  .boat-game { font-size:46px; left:7%; }
    .hook-button { min-height:82px; font-size:30px; }
}


.rod-svg-wrap {
  position:absolute; left:38%; top:16%; width:58%; height:68%; z-index:8;
}
#rod-svg {
  width:100%; height:100%; overflow:visible;
}
#rod-path {
  fill:none; stroke:#1d1713; stroke-width:8; stroke-linecap:round;
  filter:drop-shadow(0 2px 1px rgba(0,0,0,.22));
}
#line-path {
  stroke:rgba(255,255,255,.92); stroke-width:2;
}
#tip-dot {
  fill:#ffb84d; stroke:#3f2f1f; stroke-width:2;
}
.result-pop {
  position:fixed; left:50%; top:50%; transform:translate(-50%,-50%); z-index:40;
  width:min(88vw,420px); background:white; border-radius:22px; padding:18px; box-shadow:0 24px 80px rgba(0,0,0,.28);
  text-align:center; border:3px solid #dceaf0;
}


/* Ver.0.1.3: bite presentation + multi-point rod */
.bite-panel {
  position:absolute; left:4%; bottom:6%; z-index:10; width:min(62%, 420px);
  padding:12px 14px; border-radius:16px;
  background:rgba(5, 43, 66, .80); color:#fff;
  box-shadow:0 8px 24px rgba(0,0,0,.16);
  backdrop-filter:blur(5px);
  pointer-events:none;
}
.bite-panel span {
  display:block; font-size:11px; letter-spacing:.14em; font-weight:900; opacity:.72;
}
.bite-panel strong {
  display:block; margin-top:2px; font-size:clamp(22px,4vw,34px); line-height:1.15;
  min-height:1.2em; text-shadow:0 2px 4px rgba(0,0,0,.28);
}
.bite-panel small { display:block; margin-top:5px; font-size:13px; opacity:.82; }

.rod-svg-wrap {
  position:absolute; left:34%; top:13%; width:63%; height:72%; z-index:8;
  pointer-events:none;
}
#rod-svg { width:100%; height:100%; overflow:visible; }
#rod-shadow {
  fill:none; stroke:rgba(0,0,0,.20); stroke-width:11; stroke-linecap:round; stroke-linejoin:round;
}
#rod-path {
  fill:none; stroke:#2a1d14; stroke-width:8; stroke-linecap:round; stroke-linejoin:round;
  filter:drop-shadow(0 2px 1px rgba(255,255,255,.22));
}
#rod-guides circle {
  fill:#f3f4f4; stroke:#2a1d14; stroke-width:2.2;
}
#line-path {
  fill:none; stroke:rgba(248,253,255,.94); stroke-width:2.2; stroke-linecap:round;
  filter:drop-shadow(0 1px 1px rgba(0,0,0,.18));
}
#line-path.slack { stroke-dasharray:3 2; opacity:.82; }
#tip-dot {
  fill:#ffb84d; stroke:#3f2f1f; stroke-width:2;
  filter:drop-shadow(0 1px 2px rgba(0,0,0,.2));
}

.hook-feedback {
  margin:12px auto 0; width:min(620px,100%); padding:12px 16px; border-radius:14px;
  text-align:center; font-size:19px; font-weight:900; background:#edf6fa; border:1px solid #c9e1ec;
}
.hook-feedback[data-tone="good"] { background:#edf9ef; border-color:#b7ddbf; color:#205c2d; }
.hook-feedback[data-tone="early"] { background:#fff7e9; border-color:#f0d3a3; color:#78520d; }
.hook-feedback[data-tone="late"] { background:#fff1f1; border-color:#efc0c4; color:#822a33; }
.small-action { min-height:40px; padding:7px 12px; font-size:14px; }
.text-link { display:inline-block; margin-top:4px; font-size:13px; font-weight:800; color:#0b6f9f; }

/* Ver.0.1.3: fishbook */
.fishbook-heading {
  display:flex; align-items:flex-start; justify-content:space-between; gap:18px; margin-bottom:18px;
}
.fishbook-heading h1 { margin-bottom:.25em; }
.fishbook-progress {
  flex:0 0 auto; min-width:120px; padding:12px 14px; border-radius:16px; background:#eaf7fb;
  text-align:center;
}
.fishbook-progress strong { font-size:32px; line-height:1; }
.fishbook-progress span { color:var(--muted); font-weight:800; }

.fishbook-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
.fishbook-card {
  padding:0; overflow:hidden; background:#fbfeff; transition:transform .15s ease, box-shadow .15s ease;
}
.fishbook-card:not(.locked):hover { transform:translateY(-2px); box-shadow:0 10px 24px rgba(15,61,86,.10); }
.fishbook-link { display:block; padding:14px; color:inherit; text-decoration:none; height:100%; }
.fish-image-frame {
  height:150px; display:grid; place-items:center; border-radius:12px; background:linear-gradient(#edfaff,#e7f3f7);
  overflow:hidden;
}
.fish-image-frame img { width:92%; height:136px; object-fit:contain; }
.fish-image-frame.mystery { margin:14px 14px 8px; }
.fishbook-card.locked { filter:none; opacity:.60; text-align:center; padding-bottom:15px; }
.fishbook-name-row { display:flex; align-items:baseline; justify-content:space-between; gap:10px; }
.fishbook-name-row h3 { margin:12px 0 5px; font-size:23px; }
.detail-arrow { color:#0b6f9f; font-size:13px; font-weight:900; white-space:nowrap; }
.fish-summary { color:#456276; margin:6px 0 12px; min-height:3.1em; }
.fishbook-stats {
  display:flex; flex-wrap:wrap; gap:8px 14px; border-top:1px solid var(--line); padding-top:10px;
  font-size:14px; color:var(--muted);
}
.fishbook-stats strong { color:var(--ink); }
.silhouette { font-size:78px; filter:grayscale(1) brightness(.35); }

/* Ver.0.1.3: fish detail */
.fish-detail-hero { display:grid; grid-template-columns:minmax(240px, .8fr) minmax(0, 1.2fr); gap:28px; align-items:center; }
.fish-detail-image {
  min-height:230px; display:grid; place-items:center; border-radius:18px; background:linear-gradient(#e8f8fd,#f8fcfe);
}
.fish-detail-image img { width:min(100%,340px); max-height:230px; object-fit:contain; }
.fish-detail-record { display:flex; flex-wrap:wrap; gap:8px 16px; margin:16px 0 8px; }
.fish-detail-record span { background:#edf7fb; border-radius:999px; padding:7px 11px; font-size:14px; }
.profile-version { color:var(--muted); }
.fish-detail-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; }
.fish-article { margin-bottom:0; }
.fish-article h2 { margin-top:.2em; }
.fish-article h3 { font-size:15px; color:#2c6a85; margin:18px 0 4px; }
.fish-article p { margin:4px 0; }
.game-note { margin-top:18px; padding:12px 14px; background:#f2f8fb; border-left:4px solid #69a7c0; border-radius:10px; color:#415f70; font-size:14px; }
.tag-list { display:flex; flex-wrap:wrap; gap:8px; }
.tag-list span { padding:6px 10px; border-radius:999px; background:#e8f5fa; font-size:14px; font-weight:800; }
.trivia-list { padding-left:1.3em; }
.trivia-list li { margin-bottom:10px; }
.sources-card { margin-top:18px; }
.source-list { padding-left:1.4em; }
.source-list li { margin:12px 0; overflow-wrap:anywhere; }
.source-list small { display:block; color:var(--muted); margin-top:2px; }

@media (max-width: 700px) {
  .bite-panel { left:4%; bottom:5%; width:72%; padding:10px 12px; }
  .bite-panel strong { font-size:24px; }
  .bite-panel small { font-size:12px; }
  .rod-svg-wrap { left:27%; top:13%; width:72%; height:68%; }
  .game-controls { grid-template-columns:minmax(0,1fr) auto; gap:8px; }
  .quit-button { padding:8px 10px; font-size:14px; }
  .fishbook-heading { align-items:center; }
  .fishbook-progress { min-width:94px; padding:10px; }
  .fishbook-progress strong { font-size:28px; }
  .fishbook-grid { grid-template-columns:1fr; }
  .fish-detail-hero { grid-template-columns:1fr; gap:16px; }
  .fish-detail-image { min-height:190px; }
  .fish-detail-image img { max-height:190px; }
  .fish-detail-grid { grid-template-columns:1fr; gap:0; }
  .fish-article { margin-bottom:14px; }
}


/* Ver.0.1.4 hotfix: controls stay tappable and show an explicit ready state. */
.game-controls {
  position: relative;
  z-index: 30;
  pointer-events: auto;
}
.quit-form {
  margin: 0;
  padding: 0;
}
.hook-button {
  position: relative;
  z-index: 31;
  cursor: pointer;
  -webkit-tap-highlight-color: rgba(0,0,0,0);
}
.hook-button:disabled {
  cursor: default;
  opacity: .42;
  filter: grayscale(.55);
  box-shadow: none;
}
.hook-button.ready:not(:disabled) {
  opacity: 1;
  filter: none;
  background: #ffad26;
  color: #2f1b00;
  box-shadow: 0 7px 0 #c97108, 0 0 0 4px rgba(255,255,255,.72);
}
.quit-button {
  position: relative;
  z-index: 31;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(0,0,0,0);
}
@media (max-width: 700px) {
  .game-controls {
    grid-template-columns: minmax(0,1fr) auto;
  }
  .quit-button {
    min-height: 60px;
  }
}


/* Ver.0.1.5: small non-blocking catch toast */
@media (max-width: 700px) {
  .result-pop {
    left: 10px;
    top: 10px;
    width: min(290px, calc(100vw - 20px));
    padding: 10px;
  }
  .result-pop img {
    width: 62px;
    height: 48px;
  }
  .result-pop h2 {
    font-size: 18px;
  }
}

/* Ver.0.1.6 tackle / five-tier helpers */
.field-note { display:block; margin-top:6px; color:var(--muted); font-size:13px; line-height:1.35; }
.size-tier-label { display:inline-block; margin-left:8px; padding:2px 7px; border-radius:999px; background:#eef6fa; color:#456579; font-weight:800; }


/* Ver.0.1.7 admin */
.admin-auth-card { max-width:680px; margin-inline:auto; }
.admin-form, .admin-profile-form { display:grid; gap:16px; margin-top:18px; }
.admin-form input,
.admin-profile-form input,
.admin-profile-form textarea,
.admin-upload-form input[type="file"] {
  width:100%;
  box-sizing:border-box;
}
.admin-profile-form textarea {
  resize:vertical;
  min-height:84px;
}
.admin-heading {
  display:flex;
  gap:18px;
  align-items:flex-start;
  justify-content:space-between;
  flex-wrap:wrap;
}
.admin-summary {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  margin:18px 0;
}
.admin-summary div {
  background:#eef8fc;
  border-radius:14px;
  padding:14px 10px;
  text-align:center;
}
.admin-summary strong { display:block; font-size:25px; }
.admin-summary span { display:block; color:var(--muted); font-size:13px; }
.admin-fish-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
}
.admin-fish-card {
  display:flex;
  flex-direction:column;
  gap:12px;
}
.admin-fish-card .button { margin-top:auto; }
.admin-badges { display:flex; flex-wrap:wrap; gap:7px; }
.admin-badge {
  display:inline-block;
  padding:4px 8px;
  border-radius:999px;
  background:#eef3f6;
  color:#496270;
  font-size:12px;
  font-weight:850;
}
.admin-badge.active {
  background:#def5e6;
  color:#22613a;
}
.admin-image-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
  margin-top:16px;
}
.admin-image-card {
  border:1px solid var(--line);
  border-radius:16px;
  padding:12px;
  background:#fbfdfe;
}
.admin-image-title {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}
.admin-image-title strong { display:block; font-size:18px; }
.admin-image-title span:not(.admin-badge) { color:var(--muted); font-size:12px; }
.admin-image-preview {
  min-height:160px;
  display:grid;
  place-items:center;
  border-radius:12px;
  overflow:hidden;
  background:
    linear-gradient(45deg,#eef2f4 25%,transparent 25%) 0 0/24px 24px,
    linear-gradient(45deg,transparent 75%,#eef2f4 75%) 0 0/24px 24px,
    linear-gradient(45deg,transparent 75%,#eef2f4 75%) 12px -12px/24px 24px,
    linear-gradient(45deg,#eef2f4 25%,#fff 25%) 12px 12px/24px 24px;
}
.admin-image-preview img {
  width:100%;
  max-height:240px;
  object-fit:contain;
}
.admin-upload-form,
.admin-restore-form {
  display:grid;
  gap:8px;
  margin-top:10px;
}
.admin-fieldset {
  border:1px solid var(--line);
  border-radius:16px;
  padding:14px;
  display:grid;
  gap:14px;
}
.admin-fieldset legend {
  padding:0 8px;
  font-weight:900;
}
.success {
  padding:12px 14px;
  margin:12px 0;
  border-radius:12px;
  background:#e9f8ee;
  border:1px solid #bce3c8;
  color:#235f39;
  font-weight:750;
}
code {
  white-space:normal;
  overflow-wrap:anywhere;
}
@media (max-width:760px) {
  .admin-fish-grid,
  .admin-image-grid { grid-template-columns:1fr; }
  .admin-summary { grid-template-columns:1fr 1fr; }
  .admin-summary div:last-child { grid-column:1 / -1; }
  .admin-image-preview { min-height:140px; }
}


/* Ver.0.1.8 fishbook rarity-image unlock selector */
.fish-image-frame { position:relative; }
.fishbook-image-tier,
.fish-detail-tier-badge {
  position:absolute;
  right:8px;
  bottom:8px;
  display:inline-flex;
  align-items:center;
  min-height:28px;
  padding:4px 9px;
  border-radius:999px;
  background:rgba(8, 42, 61, .82);
  color:#fff;
  font-size:12px;
  font-weight:900;
  letter-spacing:.02em;
  backdrop-filter:blur(4px);
}
.fishbook-tier-mini {
  display:flex;
  flex-wrap:wrap;
  gap:5px;
  margin-top:10px;
}
.fishbook-tier-mini span {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:24px;
  padding:3px 7px;
  border-radius:999px;
  font-size:11px;
  font-weight:850;
}
.fishbook-tier-mini .seen {
  background:#e3f5eb;
  color:#24643f;
  border:1px solid #b7dfc7;
}
.fishbook-tier-mini .locked {
  width:24px;
  padding:0;
  background:#eef2f4;
  color:#9aa9b1;
  border:1px solid #dce3e7;
}
.fish-detail-image-block { min-width:0; }
.fish-detail-image { position:relative; overflow:hidden; }
.fish-tier-selector {
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:6px;
  margin-top:10px;
}
.fish-tier-button {
  min-height:38px;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:6px 7px;
  border-radius:10px;
  border:1px solid #bfd5df;
  background:#f4fafc;
  color:#24556c;
  text-decoration:none;
  font-size:12px;
  font-weight:900;
  line-height:1.15;
  text-align:center;
}
.fish-tier-button:hover { background:#e7f5fa; }
.fish-tier-button.selected {
  background:#225f79;
  border-color:#225f79;
  color:#fff;
}
.fish-tier-button.locked {
  background:#f2f4f5;
  color:#99a5ab;
  border-color:#e0e5e7;
  cursor:default;
}
.fish-tier-help { margin:7px 2px 0; text-align:center; }

@media (max-width:700px) {
  .fish-tier-selector {
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
  .fish-tier-button {
    min-height:42px;
    font-size:13px;
  }
}


/* Ver.0.1.9 fishbook fixed display */
.fish-image-frame.uncaught-svg {
  background:#f5f8fa;
  filter:saturate(.82);
}
.fish-image-frame.uncaught-svg img { opacity:.82; }
.fishbook-image-tier.muted {
  background:rgba(74,91,102,.80);
  color:#fff;
}
.fishbook-fixed-note {
  margin:7px 0 0;
  font-size:12px;
  color:#456575;
  font-weight:800;
}
.fishbook-fix-form {
  display:flex;
  justify-content:center;
  margin-top:10px;
}
.fishbook-fix-form .selected {
  background:#e6f6ec;
  border-color:#9bd3ac;
  color:#235f39;
}

/* Ver.0.1.9 analytics */
.admin-heading-actions {
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap:wrap;
}
.analytics-search {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
  margin-top:18px;
}
.analytics-search label { min-width:0; }
.analytics-search input,
.analytics-search select {
  width:100%;
  box-sizing:border-box;
}
.analytics-search-wide { grid-column:span 2; }
.analytics-search-actions {
  display:flex;
  gap:8px;
  align-items:end;
  flex-wrap:wrap;
}
.analytics-summary {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(130px,1fr));
  gap:12px;
  margin:14px 0;
}
.analytics-summary .card {
  margin:0;
  text-align:center;
  padding:16px 10px;
}
.analytics-summary strong {
  display:block;
  font-size:28px;
  line-height:1.1;
}
.analytics-summary span {
  display:block;
  margin-top:5px;
  font-size:13px;
  color:var(--muted);
}
.combo-review-list,
.analytics-session-list {
  display:grid;
  gap:12px;
  margin-top:14px;
}
.combo-review-card,
.analytics-session-card {
  border:1px solid var(--line);
  border-radius:16px;
  padding:14px;
  background:#fbfdfe;
}
.combo-review-top,
.analytics-session-head {
  display:flex;
  gap:14px;
  align-items:flex-start;
  justify-content:space-between;
}
.combo-review-top h3 { margin:3px 0 0; }
.combo-rate,
.analytics-catch-score {
  min-width:86px;
  text-align:center;
  padding:8px 10px;
  border-radius:12px;
  background:#eef8fc;
}
.combo-rate strong,
.analytics-catch-score strong {
  display:block;
  font-size:22px;
}
.combo-rate span,
.analytics-catch-score span {
  display:block;
  font-size:11px;
  color:var(--muted);
}
.combo-kpis {
  display:flex;
  flex-wrap:wrap;
  gap:7px 14px;
  margin:11px 0;
}
.combo-kpis span {
  background:#f0f5f7;
  border-radius:999px;
  padding:5px 9px;
  font-size:13px;
}
.combo-detail-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:6px 14px;
  padding-top:9px;
  color:#425d6b;
  font-size:13px;
}
.analytics-weather {
  display:flex;
  flex-wrap:wrap;
  gap:6px 12px;
  margin:10px 0;
  padding:9px 10px;
  border-radius:11px;
  background:#f5f8fa;
  color:#425d6b;
  font-size:13px;
}
.analytics-session-head > div:first-child strong,
.analytics-session-head > div:first-child span {
  display:block;
}
.analytics-session-head > div:first-child span {
  margin-top:3px;
  color:var(--muted);
}
.analytics-session-body {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
  margin:10px 0;
}
.analytics-session-body div {
  min-width:0;
  background:#fff;
  border:1px solid #edf2f4;
  border-radius:10px;
  padding:8px 9px;
}
.analytics-session-body span,
.analytics-session-body strong {
  display:block;
  overflow-wrap:anywhere;
}
.analytics-session-body span {
  color:var(--muted);
  font-size:11px;
  margin-bottom:2px;
}
.analytics-session-body strong {
  font-size:13px;
}
.combo-review-card details,
.analytics-session-card details {
  border-top:1px dashed #d7e1e6;
  padding-top:8px;
}
.combo-review-card summary,
.analytics-session-card summary {
  cursor:pointer;
  color:#416779;
  font-weight:800;
  font-size:13px;
}

@media (max-width:760px) {
  .analytics-search { grid-template-columns:1fr 1fr; }
  .analytics-search-wide { grid-column:1 / -1; }
  .analytics-search-actions { grid-column:1 / -1; }
  .analytics-summary { grid-template-columns:1fr 1fr; }
  .analytics-session-body { grid-template-columns:1fr 1fr; }
  .combo-detail-grid { grid-template-columns:1fr; }
}
@media (max-width:480px) {
  .analytics-search { grid-template-columns:1fr; }
  .analytics-search-wide,
  .analytics-search-actions { grid-column:auto; }
  .combo-review-top,
  .analytics-session-head { align-items:stretch; }
  .analytics-session-body { grid-template-columns:1fr; }
}


/* Ver.0.1.11 recommended tackle */
.recommended-tackle-box {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:12px 16px;
  align-items:center;
  margin:16px 0 20px;
  padding:14px;
  border:1px solid #b9dce9;
  border-radius:16px;
  background:#f2fbff;
}
.recommended-tackle-box strong {
  display:block;
  font-size:17px;
  margin-bottom:4px;
}
.recommended-tackle-box p {
  margin:0;
  color:var(--muted);
}
.recommended-tackle-box .small-note {
  grid-column:1 / -1;
  margin:0;
  min-height:1.3em;
  font-weight:700;
}
.recommended-tackle-button {
  white-space:nowrap;
}
@media (max-width:680px) {
  .recommended-tackle-box {
    grid-template-columns:1fr;
  }
  .recommended-tackle-box .small-note {
    grid-column:auto;
  }
  .recommended-tackle-button {
    width:100%;
  }
}


/* Ver.0.1.13 conditions + player analytics */
.condition-preview-card {
  margin:16px 0;
  padding:14px;
  border:1px solid #c9dfe8;
  border-radius:16px;
  background:#f7fbfd;
}
.condition-preview-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}
.condition-preview-head strong {
  font-size:17px;
}
.condition-preview-head span {
  font-size:12px;
  color:var(--muted);
  font-weight:700;
}
.condition-preview-grid {
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:8px;
}
.condition-preview-grid div {
  min-width:0;
  padding:9px;
  border-radius:11px;
  background:#fff;
  border:1px solid #e6eef2;
}
.condition-preview-grid span,
.condition-preview-grid strong {
  display:block;
}
.condition-preview-grid span {
  font-size:11px;
  color:var(--muted);
  margin-bottom:3px;
}
.condition-preview-grid strong {
  font-size:13px;
  overflow-wrap:anywhere;
}
.condition-preview-card > p {
  margin:10px 0 0;
  color:#496675;
  font-size:13px;
  line-height:1.55;
}

.sea-condition-hud {
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:8px;
  margin:10px 0 6px;
}
.sea-condition-hud div {
  min-width:0;
  padding:8px 10px;
  border-radius:12px;
  border:1px solid #c9dce6;
  background:#f7fbfd;
}
.sea-condition-hud span,
.sea-condition-hud strong {
  display:block;
}
.sea-condition-hud span {
  font-size:10px;
  color:var(--muted);
  margin-bottom:2px;
}
.sea-condition-hud strong {
  font-size:12px;
  line-height:1.35;
  overflow-wrap:anywhere;
}
.game-condition-note {
  margin:0 0 8px;
  font-size:11px;
  color:var(--muted);
}

@media (max-width:760px) {
  .condition-preview-grid,
  .sea-condition-hud {
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
}
@media (max-width:480px) {
  .condition-preview-head {
    align-items:flex-start;
    flex-direction:column;
  }
  .condition-preview-grid,
  .sea-condition-hud {
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}


/* Ver.0.1.14 large fishbook */
.fishbook-search {
  display:grid;
  grid-template-columns:auto minmax(0, 1fr) auto;
  gap:8px 10px;
  align-items:center;
  margin:14px 0 18px;
  padding:10px 12px;
  border:1px solid #d7e5eb;
  border-radius:14px;
  background:#f8fbfc;
}
.fishbook-search label {
  font-weight:800;
  font-size:13px;
}
.fishbook-search input {
  min-width:0;
  width:100%;
}
.fishbook-search span {
  color:var(--muted);
  font-size:12px;
  font-weight:800;
}
@media (max-width:560px) {
  .fishbook-search {
    grid-template-columns:1fr auto;
  }
  .fishbook-search label {
    grid-column:1 / -1;
  }
}


/* Ver.0.1.15 profile bulk import */
.admin-profile-import {
  margin-top:14px;
}
.admin-import-form {
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
  margin-top:12px;
}
.admin-import-form input[type="file"] {
  flex:1 1 320px;
  min-width:0;
}
@media (max-width:560px) {
  .admin-import-form {
    align-items:stretch;
  }
  .admin-import-form input[type="file"],
  .admin-import-form .button {
    width:100%;
  }
}


/* Ver.0.1.15 outing catch breakdown */
.analytics-catch-breakdown {
  margin:10px 0;
  padding:10px;
  border:1px solid #e2ebef;
  border-radius:12px;
  background:#fff;
}
.analytics-catch-breakdown > strong {
  display:block;
  margin-bottom:7px;
  font-size:13px;
}
.analytics-catch-chips {
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}
.analytics-catch-chips span {
  padding:5px 8px;
  border-radius:999px;
  background:#eef6f8;
  font-size:12px;
}


/* Ver.0.1.16 analytics stale-session repair */
.analytics-session-actions {
  display:flex;
  justify-content:flex-end;
  align-items:center;
  gap:8px;
  margin-top:10px;
  padding-top:9px;
  border-top:1px solid #edf2f4;
}
.analytics-session-actions form {
  margin:0;
}
.button.danger {
  border-color:#e5a5aa;
  color:#8f2730;
  background:#fff7f7;
}
.button.danger:hover {
  background:#fdebec;
}


/* Ver.0.1.18 economy */
.trip-cost-card,
.result-finance,
.economy-hero,
.economy-stat-grid > div,
.economy-ledger article,
.money-ranking-list article,
.game-clear-choice > div {
  border:1px solid #d9e6eb;
  border-radius:16px;
  background:#fbfdfe;
}

.trip-cost-card {
  padding:14px;
  margin:16px 0;
}
.trip-cost-head,
.result-finance-head {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}
.trip-cost-head > div:first-child strong,
.result-finance-head strong {
  display:block;
}
.trip-cost-head span,
.result-finance-head span {
  color:var(--muted);
  font-size:12px;
}
.trip-cost-total {
  font-size:24px;
  font-weight:900;
  white-space:nowrap;
}
.trip-cost-grid,
.result-finance-grid,
.economy-stat-grid {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px;
  margin-top:12px;
}
.trip-cost-grid > div,
.result-finance-grid > div {
  padding:9px;
  border-radius:12px;
  background:#fff;
  border:1px solid #e7eff2;
}
.trip-cost-grid span,
.trip-cost-grid strong,
.trip-cost-grid small,
.result-finance-grid span,
.result-finance-grid strong {
  display:block;
}
.trip-cost-grid span,
.result-finance-grid span {
  font-size:11px;
  color:var(--muted);
}
.trip-cost-grid strong,
.result-finance-grid strong {
  margin-top:2px;
  font-size:14px;
}
.trip-cost-grid small {
  margin-top:2px;
  color:var(--muted);
  font-size:10px;
}
.trip-balance-preview {
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  margin-top:12px;
  padding:10px;
  border-radius:12px;
  background:#eef7fa;
  font-size:14px;
}
.trip-balance-preview strong {
  font-size:17px;
}
.trip-cost-card > p {
  margin:10px 0 0;
  color:var(--muted);
  font-size:11px;
  line-height:1.5;
}

.result-finance {
  margin:14px 0 18px;
  padding:14px;
}
.catch-sale-value {
  margin-top:6px;
  font-weight:800;
  font-size:12px;
  color:#356071;
}

.game-clear-banner {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-top:12px;
  padding:12px;
  border-radius:14px;
  background:#f4fbef;
  border:1px solid #cfe3c4;
}
.game-clear-banner strong {
  font-size:16px;
}

.economy-hero {
  padding:20px;
  margin:16px 0;
  text-align:center;
}
.economy-hero.in-debt {
  background:#fff7f7;
  border-color:#edc6c9;
}
.economy-hero.cleared {
  background:#f5fbef;
  border-color:#d4e6c8;
}
.economy-hero span,
.economy-hero strong,
.economy-hero small {
  display:block;
}
.economy-hero strong {
  margin:6px 0;
  font-size:34px;
  line-height:1.1;
}
.economy-hero small {
  color:var(--muted);
}
.economy-stat-grid {
  grid-template-columns:repeat(3,minmax(0,1fr));
  margin-bottom:14px;
}
.economy-stat-grid > div {
  padding:12px;
}
.economy-stat-grid span,
.economy-stat-grid strong {
  display:block;
}
.economy-stat-grid span {
  color:var(--muted);
  font-size:11px;
  margin-bottom:4px;
}
.economy-stat-grid strong {
  font-size:16px;
}

.economy-ledger {
  display:grid;
  gap:8px;
}
.economy-ledger article {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  padding:11px 12px;
}
.economy-ledger article > div:first-child strong,
.economy-ledger article > div:first-child small,
.ledger-amount,
.ledger-amount small {
  display:block;
}
.economy-ledger article > div:first-child small,
.ledger-amount small {
  color:var(--muted);
  font-size:10px;
  margin-top:2px;
}
.ledger-amount {
  text-align:right;
  font-weight:900;
  white-space:nowrap;
}
.ledger-amount.negative {
  color:#9c323b;
}
.ledger-amount.positive {
  color:#267247;
}

.money-ranking-list {
  display:grid;
  gap:8px;
}
.money-ranking-list article {
  display:grid;
  grid-template-columns:48px minmax(0,1fr) auto;
  gap:10px;
  align-items:center;
  padding:11px 12px;
}
.money-rank-no {
  display:grid;
  place-items:center;
  width:36px;
  height:36px;
  border-radius:50%;
  background:#edf5f8;
  font-weight:900;
}
.money-rank-player strong,
.money-rank-player small,
.money-rank-balance strong,
.money-rank-balance small {
  display:block;
}
.money-rank-player small,
.money-rank-balance small {
  color:var(--muted);
  font-size:10px;
  margin-top:2px;
}
.money-rank-balance {
  text-align:right;
}
.money-rank-balance strong {
  font-size:17px;
}

.economy-clear-card {
  text-align:center;
}
.game-clear-choice {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
  margin-top:20px;
  text-align:left;
}
.game-clear-choice > div {
  padding:16px;
}
.game-clear-choice h2 {
  margin-top:0;
}

@media (max-width:760px) {
  .trip-cost-grid,
  .result-finance-grid {
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .economy-stat-grid {
    grid-template-columns:1fr;
  }
}
@media (max-width:560px) {
  .trip-cost-head,
  .result-finance-head,
  .game-clear-banner {
    align-items:stretch;
    flex-direction:column;
  }
  .trip-cost-total {
    font-size:21px;
  }
  .trip-balance-preview {
    flex-wrap:wrap;
  }
  .economy-ledger article {
    align-items:flex-start;
  }
  .money-ranking-list article {
    grid-template-columns:40px minmax(0,1fr);
  }
  .money-rank-balance {
    grid-column:2;
    text-align:left;
  }
  .game-clear-choice {
    grid-template-columns:1fr;
  }
}


/* Ver.0.1.18 analytics finance */
.analytics-finance-line {
  display:flex;
  flex-wrap:wrap;
  gap:6px 12px;
  align-items:center;
  margin:9px 0;
  padding:9px 10px;
  border-radius:11px;
  background:#f8fbfc;
  border:1px solid #e3ecef;
  font-size:11px;
}
.analytics-finance-line strong {
  margin-left:auto;
}
@media (max-width:560px) {
  .analytics-finance-line strong {
    width:100%;
    margin-left:0;
  }
}


/* Ver.0.1.19 economy admin and sale rankings */
.admin-economy-settings {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
  margin-top:14px;
}
.admin-economy-settings label {
  display:grid;
  gap:6px;
  padding:12px;
  border:1px solid #dce8ed;
  border-radius:14px;
  background:#fbfdfe;
  font-weight:800;
}
.admin-economy-settings label small {
  font-weight:400;
  color:var(--muted);
  line-height:1.45;
}
.admin-economy-settings input,
.admin-economy-settings select {
  width:100%;
}
.admin-economy-settings .button {
  justify-self:start;
}
.inline-number-unit {
  display:flex;
  gap:8px;
  align-items:center;
}
.inline-number-unit input {
  flex:1;
}
.inline-number-unit span {
  white-space:nowrap;
  color:var(--muted);
  font-size:13px;
}

.refresh-diagnostic-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  margin-top:14px;
}
.refresh-diagnostic-grid article {
  padding:12px;
  border-radius:14px;
  border:1px solid #dce7eb;
  background:#fafcfd;
}
.refresh-diagnostic-grid article.ok {
  border-color:#b8dfc5;
  background:#f3fbf5;
}
.refresh-diagnostic-grid article.ng {
  border-color:#efc3c6;
  background:#fff7f7;
}
.refresh-diagnostic-grid strong,
.refresh-diagnostic-grid span,
.refresh-diagnostic-grid small {
  display:block;
}
.refresh-diagnostic-grid span {
  margin-top:5px;
  font-weight:800;
}
.refresh-diagnostic-grid small {
  margin-top:4px;
  color:var(--muted);
  overflow-wrap:anywhere;
}
.refresh-diagnostic-grid details {
  margin-top:8px;
  font-size:12px;
}
.economy-master-summary {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px;
  margin-top:14px;
}
.economy-master-summary > div {
  padding:10px;
  border:1px solid #e1eaee;
  border-radius:12px;
  background:#fff;
}
.economy-master-summary span,
.economy-master-summary strong {
  display:block;
}
.economy-master-summary span {
  color:var(--muted);
  font-size:11px;
}
.economy-master-summary strong {
  margin-top:3px;
}

.special-day-banner {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  margin:12px 0;
  padding:13px 14px;
  border:1px solid #ead599;
  border-radius:14px;
  background:#fff9e7;
}
.special-day-banner strong,
.special-day-banner span {
  display:block;
}
.special-day-banner strong {
  font-size:16px;
}
.special-day-banner span {
  color:#6b5a2a;
  font-size:12px;
}
.analytics-special-day {
  display:inline-block;
  margin:6px 0 0;
  padding:5px 9px;
  border:1px solid #ead599;
  border-radius:999px;
  background:#fff9e7;
  font-size:11px;
  font-weight:900;
}

.sale-ranking-filter {
  display:flex;
  gap:10px;
  align-items:end;
  margin:12px 0 16px;
}
.sale-ranking-filter label {
  display:grid;
  gap:5px;
  min-width:min(360px,100%);
  font-weight:800;
}
.sale-ranking-list,
.sale-trip-ranking {
  display:grid;
  gap:8px;
}
.sale-ranking-list article,
.sale-trip-ranking article {
  display:grid;
  grid-template-columns:48px minmax(0,1fr) auto;
  gap:12px;
  align-items:center;
  padding:12px;
  border:1px solid #dfe9ed;
  border-radius:14px;
  background:#fff;
}
.sale-trip-ranking article.special {
  border-color:#ead599;
  background:#fffdf5;
}
.sale-rank-no {
  display:grid;
  place-items:center;
  width:36px;
  height:36px;
  border-radius:50%;
  background:#edf5f8;
  font-weight:900;
}
.sale-ranking-list article small,
.sale-trip-ranking article small,
.sale-rank-value a {
  display:block;
  margin-top:3px;
  color:var(--muted);
  font-size:11px;
}
.sale-rank-value,
.sale-trip-stats {
  text-align:right;
}
.sale-rank-value strong,
.sale-trip-stats > strong {
  display:block;
  font-size:20px;
}
.sale-trip-main {
  min-width:0;
}
.sale-trip-badges {
  display:flex;
  flex-wrap:wrap;
  gap:5px;
  margin-top:6px;
}
.sale-trip-badges span {
  padding:3px 7px;
  border-radius:999px;
  background:#eef6f8;
  font-size:10px;
  font-weight:800;
}
.sale-trip-stats .button {
  margin-top:7px;
}

.sale-detail-hero {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
  margin-top:14px;
}
.sale-detail-hero > div,
.sale-detail-finance > div,
.sale-species-summary article,
.trip-detail-grid > div {
  padding:11px;
  border:1px solid #e0eaee;
  border-radius:12px;
  background:#fbfdfe;
}
.sale-detail-hero span,
.sale-detail-hero strong,
.sale-detail-finance span,
.sale-detail-finance strong,
.trip-detail-grid span,
.trip-detail-grid strong {
  display:block;
}
.sale-detail-hero span,
.sale-detail-finance span,
.trip-detail-grid span {
  color:var(--muted);
  font-size:11px;
}
.sale-detail-hero strong {
  margin-top:4px;
  font-size:22px;
}
.why-high-list {
  display:grid;
  gap:7px;
  margin:12px 0;
}
.why-high-list div {
  padding:10px 12px;
  border-left:4px solid #4aa9c8;
  border-radius:8px;
  background:#f4fafc;
}
.sale-detail-finance {
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:7px;
}
.sale-species-summary {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(170px,1fr));
  gap:8px;
}
.sale-species-summary strong,
.sale-species-summary span,
.sale-species-summary b,
.sale-species-summary small {
  display:block;
}
.sale-species-summary b {
  margin-top:5px;
  font-size:18px;
}
.sale-species-summary small {
  color:var(--muted);
  margin-top:2px;
}
.sale-catch-table-wrap {
  overflow-x:auto;
}
.sale-catch-table {
  min-width:560px;
}
.trip-detail-grid {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(150px,1fr));
  gap:8px;
}
.sale-pool-detail {
  margin-top:12px;
}
.sale-pool-detail > div {
  display:flex;
  flex-wrap:wrap;
  gap:5px;
  margin-top:8px;
}
.sale-pool-detail span {
  padding:4px 7px;
  border-radius:999px;
  background:#eef6f8;
  font-size:11px;
}

@media (max-width:760px) {
  .admin-economy-settings,
  .refresh-diagnostic-grid {
    grid-template-columns:1fr;
  }
  .economy-master-summary {
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .sale-detail-finance {
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}
@media (max-width:560px) {
  .special-day-banner {
    align-items:flex-start;
    flex-direction:column;
  }
  .sale-ranking-filter {
    align-items:stretch;
    flex-direction:column;
  }
  .sale-ranking-list article,
  .sale-trip-ranking article {
    grid-template-columns:40px minmax(0,1fr);
  }
  .sale-rank-value,
  .sale-trip-stats {
    grid-column:2;
    text-align:left;
  }
  .sale-detail-hero {
    grid-template-columns:1fr;
  }
  .sale-detail-finance {
    grid-template-columns:1fr;
  }
}


/* Ver.0.1.20 target success reward */
.target-reward-explanation {
  margin-top:12px;
  padding:13px 14px;
  border:1px solid #cfe2e9;
  border-radius:14px;
  background:#f7fbfd;
}
.target-reward-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.target-reward-head strong,
.target-reward-head span {
  display:block;
}
.target-reward-head span {
  padding:4px 8px;
  border-radius:999px;
  background:#e9f4f7;
  font-size:11px;
  font-weight:800;
}
.target-reward-reasons,
.target-reward-calculation {
  display:grid;
  gap:6px;
  margin-top:10px;
}
.target-reward-reasons > div,
.target-reward-calculation > div {
  padding:8px 9px;
  border-radius:10px;
  background:#fff;
  border:1px solid #e1ecef;
  font-size:12px;
  line-height:1.5;
}
.target-reward-explanation details {
  margin-top:10px;
}
.target-reward-explanation details > summary {
  cursor:pointer;
  font-weight:800;
}
.target-reward-explanation > p {
  margin:10px 0 0;
  color:var(--muted);
  font-size:11px;
  line-height:1.5;
}
.target-reward-explanation.ranking-detail {
  margin-top:16px;
}
.analytics-reward-details {
  margin-top:8px;
  padding:8px 10px;
  border:1px solid #dce9ed;
  border-radius:10px;
  background:#fbfdfe;
}
.analytics-reward-details summary {
  cursor:pointer;
  font-weight:800;
  font-size:12px;
}
.analytics-reward-details p {
  margin:6px 0;
  font-size:11px;
  line-height:1.45;
}
.reward-policy-grid {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
  margin:14px 0;
}
.reward-policy-grid article {
  padding:12px;
  border:1px solid #dce8ed;
  border-radius:14px;
  background:#fbfdfe;
}
.reward-policy-grid strong,
.reward-policy-grid span,
.reward-policy-grid small {
  display:block;
}
.reward-policy-grid strong {
  margin-bottom:8px;
  font-size:16px;
}
.reward-policy-grid span {
  margin:5px 0;
  font-size:12px;
}
.reward-policy-grid small {
  margin-top:8px;
  color:var(--muted);
  line-height:1.5;
}

@media (max-width:760px) {
  .reward-policy-grid {
    grid-template-columns:1fr;
  }
}
@media (max-width:560px) {
  .target-reward-head {
    align-items:flex-start;
    flex-direction:column;
  }
}


/* Ver.0.1.21 balance parameters and trip expenses */
.balance-parameter-form {
  display:grid;
  gap:16px;
}
.balance-parameter-form > .card {
  margin:0;
}
.balance-field-grid {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
  margin-top:12px;
}
.balance-field-grid > label {
  display:grid;
  gap:5px;
  padding:10px;
  border:1px solid #dfe9ed;
  border-radius:12px;
  background:#fbfdfe;
  font-weight:800;
}
.balance-field-grid label small {
  color:var(--muted);
  font-size:10px;
  font-weight:400;
  line-height:1.4;
}
.balance-field-grid input,
.balance-field-grid select {
  width:100%;
}
.balance-tier-table-wrap {
  overflow-x:auto;
  margin:8px 0 10px;
}
.balance-tier-table {
  min-width:760px;
}
.balance-tier-table input {
  min-width:90px;
  width:100%;
}
.balance-inline-field {
  display:flex;
  align-items:center;
  gap:8px;
  margin:8px 0 18px;
  font-weight:800;
}
.balance-inline-field input {
  width:140px;
}
.balance-inline-field span {
  color:var(--muted);
  font-size:12px;
}
.balance-price-columns {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
  margin-top:12px;
}
.balance-price-columns > div {
  padding:12px;
  border:1px solid #dfe9ed;
  border-radius:14px;
  background:#fbfdfe;
}
.balance-price-columns h3 {
  margin-top:0;
}
.balance-price-row {
  display:grid;
  grid-template-columns:minmax(0,1fr) 120px 24px;
  gap:7px;
  align-items:center;
  padding:6px 0;
  border-bottom:1px solid #edf2f4;
}
.balance-price-row:last-child {
  border-bottom:0;
}
.balance-price-row span {
  font-size:12px;
}
.balance-price-row small {
  color:var(--muted);
}
.balance-file-tools .balance-tool-actions {
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
  margin:12px 0;
}
.balance-file-tools form {
  display:flex;
  gap:7px;
  align-items:center;
  margin:0;
}
.balance-file-tools input[type="file"] {
  max-width:280px;
}
.balance-save-bar {
  position:sticky;
  bottom:8px;
  z-index:8;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  border-color:#b9d8e3;
  box-shadow:0 8px 24px rgba(25,65,82,.12);
}
.balance-save-bar strong,
.balance-save-bar span {
  display:block;
}
.balance-save-bar span {
  margin-top:3px;
  color:var(--muted);
  font-size:11px;
}

.trip-expense-breakdown {
  margin-top:12px;
  padding:12px;
  border:1px solid #dfe9ed;
  border-radius:14px;
  background:#fbfdfe;
}
.trip-expense-head strong {
  display:block;
  margin-bottom:8px;
}
.trip-expense-chips {
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}
.trip-expense-chips span {
  padding:5px 8px;
  border-radius:999px;
  background:#eef6f8;
  font-size:11px;
  font-weight:800;
}
.trip-expense-chips .expense-alert {
  background:#fff0f0;
  color:#8d3038;
}
.trip-expense-events {
  display:grid;
  gap:7px;
  margin-top:10px;
}
.trip-expense-events > div {
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  gap:10px;
  align-items:center;
  padding:9px 10px;
  border:1px solid #eed3d5;
  border-radius:11px;
  background:#fff9f9;
}
.trip-expense-events span {
  color:var(--muted);
  font-size:11px;
}
.trip-expense-events b {
  color:#9a313a;
  white-space:nowrap;
}
.premium-market-badge {
  background:#fff2b8;
  border-color:#e4c85a;
  color:#6d5800;
}
.catch-sale-value small {
  display:block;
  margin-top:2px;
  color:#8b6a00;
}

@media (max-width:900px) {
  .balance-field-grid {
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}
@media (max-width:650px) {
  .balance-field-grid,
  .balance-price-columns {
    grid-template-columns:1fr;
  }
  .balance-tool-actions,
  .balance-file-tools form,
  .balance-save-bar {
    align-items:stretch;
    flex-direction:column;
  }
  .balance-file-tools input[type="file"] {
    max-width:none;
    width:100%;
  }
  .balance-price-row {
    grid-template-columns:minmax(0,1fr) 110px 20px;
  }
  .trip-expense-events > div {
    grid-template-columns:1fr;
    gap:3px;
  }
  .balance-save-bar {
    position:static;
  }
}


/* Ver.0.1.22 risk-return economy */
.risk-profile-card {
  margin:12px 0;
  padding:12px 14px;
  border:1px solid #d7e5ea;
  border-radius:14px;
  background:#fbfdfe;
}
.risk-profile-card > div:first-child {
  display:flex;
  align-items:baseline;
  gap:9px;
}
.risk-profile-card > div:first-child span {
  color:var(--muted);
  font-size:11px;
  font-weight:800;
}
.risk-profile-card > div:first-child strong {
  font-size:18px;
}
.risk-profile-card p {
  margin:7px 0;
  font-size:12px;
  line-height:1.5;
}
.risk-profile-stats {
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}
.risk-profile-stats span {
  padding:5px 8px;
  border-radius:999px;
  background:#eef5f7;
  font-size:10px;
  font-weight:800;
}
.risk-profile-card.risk-low {
  border-color:#b9ddcb;
  background:#f5fbf7;
}
.risk-profile-card.risk-medium {
  border-color:#d7d8bc;
  background:#fcfbf3;
}
.risk-profile-card.risk-high {
  border-color:#e7c7c9;
  background:#fff7f7;
}

.risk-band-mapping {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
  margin:12px 0;
}
.risk-band-mapping article {
  padding:10px;
  border:1px solid #dfe9ed;
  border-radius:12px;
  background:#fbfdfe;
}
.risk-band-mapping strong,
.risk-band-mapping span {
  display:block;
}
.risk-band-mapping strong {
  margin-bottom:6px;
}
.risk-band-mapping span {
  color:var(--muted);
  font-size:10px;
  line-height:1.5;
}
.risk-table {
  min-width:1180px;
}
.risk-table td:first-child {
  min-width:180px;
}
.risk-table td:first-child small {
  display:block;
  margin-top:4px;
  color:var(--muted);
  line-height:1.4;
}
.risk-table input {
  min-width:82px;
}
.risk-mult-pair {
  display:flex;
  align-items:center;
  gap:4px;
}
.risk-mult-pair input {
  width:76px;
  min-width:76px;
}
.balance-field-grid.compact {
  grid-template-columns:minmax(220px,360px);
  margin-bottom:8px;
}

@media (max-width:760px) {
  .risk-band-mapping {
    grid-template-columns:1fr;
  }
}


/* Ver.0.1.22 risk analytics/result */
.result-risk-profile {
  display:grid;
  grid-template-columns:auto auto minmax(0,1fr);
  gap:8px 12px;
  align-items:center;
  margin:10px 0;
  padding:10px 12px;
  border:1px solid #dce8ec;
  border-radius:12px;
  background:#fbfdfe;
}
.result-risk-profile span {
  color:var(--muted);
  font-size:10px;
  font-weight:800;
}
.result-risk-profile strong {
  font-size:15px;
}
.result-risk-profile small {
  color:var(--muted);
  line-height:1.45;
}
.result-risk-profile.risk-low { border-color:#b9ddcb; background:#f5fbf7; }
.result-risk-profile.risk-medium { border-color:#d7d8bc; background:#fcfbf3; }
.result-risk-profile.risk-high { border-color:#e7c7c9; background:#fff7f7; }

.risk-analytics-grid {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
  margin-top:12px;
}
.risk-analytics-card {
  padding:12px;
  border:1px solid #dfe9ed;
  border-radius:14px;
  background:#fbfdfe;
}
.risk-analytics-card > strong {
  display:block;
  margin-bottom:9px;
}
.risk-analytics-card > div {
  display:flex;
  justify-content:space-between;
  gap:8px;
  padding:5px 0;
  border-top:1px solid #edf2f4;
}
.risk-analytics-card span {
  color:var(--muted);
  font-size:11px;
}
.risk-analytics-card.risk-low { border-color:#b9ddcb; background:#f5fbf7; }
.risk-analytics-card.risk-medium { border-color:#d7d8bc; background:#fcfbf3; }
.risk-analytics-card.risk-high { border-color:#e7c7c9; background:#fff7f7; }

.analytics-risk-badge {
  display:inline-block;
  width:max-content;
  margin:8px 0 0;
  padding:5px 8px;
  border-radius:999px;
  font-size:10px;
  font-weight:800;
  background:#eef5f7;
}
.analytics-risk-badge.risk-low { background:#e6f6ed; color:#286947; }
.analytics-risk-badge.risk-medium { background:#f5f1db; color:#776a24; }
.analytics-risk-badge.risk-high { background:#fde8e9; color:#8e3038; }

@media (max-width:700px) {
  .risk-analytics-grid {
    grid-template-columns:1fr;
  }
  .result-risk-profile {
    grid-template-columns:1fr;
  }
}


.risk-target-assignment-grid {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
  margin:8px 0 14px;
}
.risk-target-assignment-grid label {
  display:grid;
  gap:5px;
  padding:9px;
  border:1px solid #dfe9ed;
  border-radius:11px;
  background:#fbfdfe;
}
.risk-target-assignment-grid label > span {
  font-weight:800;
  font-size:12px;
}
.risk-target-assignment-grid small {
  color:var(--muted);
  font-weight:400;
}
@media (max-width:760px) {
  .risk-target-assignment-grid {
    grid-template-columns:1fr;
  }
}


/* Ver.0.1.22 NAS hotfix3 admin/practice */
.admin-fish-tools-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.admin-visible-count{min-width:90px;padding:8px 12px;border-radius:12px;background:#eef7fa;text-align:center}
.admin-visible-count strong,.admin-visible-count span{display:block}
.admin-visible-count strong{font-size:22px}
.admin-visible-count span{color:var(--muted);font-size:10px}
.admin-fish-tool-grid{display:grid;grid-template-columns:minmax(0,2fr) minmax(220px,1fr);gap:10px;margin-top:12px}
.admin-fish-tool-grid label{display:grid;gap:5px;font-weight:800}
.admin-fish-tool-grid input,.admin-fish-tool-grid select{width:100%}
.admin-badge.warning{border-color:#e8c780;background:#fff8e6;color:#765b17}
.admin-fish-card[hidden]{display:none!important}
.practice-button{border-color:#3d8f6c;color:#1f6d4d}
.practice-head{display:grid;grid-template-columns:minmax(0,1fr) 140px;align-items:center;gap:16px}
.practice-head img{width:140px;height:105px;object-fit:contain}
.practice-meta{display:flex;flex-wrap:wrap;gap:7px;margin:10px 0}
.practice-meta span{padding:6px 9px;border-radius:999px;background:#eef6f8;font-size:11px}
.practice-stage{margin-top:10px}
.practice-controls{display:flex;gap:12px;align-items:center;margin:12px 0}
.practice-controls .hook-button{flex:1}
.practice-result{margin-top:10px}
.practice-result h2{margin-bottom:8px}
@media(max-width:700px){
  .admin-fish-tool-grid{grid-template-columns:1fr}
  .practice-head{grid-template-columns:1fr}
  .practice-head img{width:120px;height:90px;justify-self:center}
  .practice-controls{flex-direction:column;align-items:stretch}
}


/* Ver.0.1.22 NAS hotfix4 image-management */
.notice.compact {
  margin:10px 0;
  padding:10px 12px;
}
.admin-card-preview {
  display:grid;
  grid-template-columns:92px minmax(0,1fr);
  gap:10px;
  align-items:center;
  padding:8px;
  border:1px solid #dce9ed;
  border-radius:12px;
  background:#f8fbfc;
}
.admin-card-preview img {
  width:92px;
  height:70px;
  object-fit:contain;
  border-radius:8px;
}
.admin-card-preview span {
  font-size:10px;
  font-weight:800;
  color:var(--muted);
}
.admin-quick-image-form {
  display:grid;
  grid-template-columns:110px minmax(0,1fr);
  gap:7px;
  align-items:center;
  padding:9px;
  border:1px dashed #cfdfe5;
  border-radius:12px;
  background:#fbfdfe;
}
.admin-quick-image-form select,
.admin-quick-image-form input[type="file"],
.admin-quick-image-form button {
  min-width:0;
  width:100%;
}
.admin-quick-image-form button {
  grid-column:1 / -1;
}
.admin-image-import code {
  white-space:nowrap;
}
@media(max-width:700px) {
  .admin-card-preview {
    grid-template-columns:76px minmax(0,1fr);
  }
  .admin-card-preview img {
    width:76px;
    height:58px;
  }
  .admin-quick-image-form {
    grid-template-columns:1fr;
  }
  .admin-quick-image-form button {
    grid-column:auto;
  }
}


/* Ver.0.1.22 NAS hotfix5 pending image compression */
.admin-compress-panel strong {
  color:#0b2c43;
}
.admin-compress-panel code,
.admin-image-import code {
  white-space:nowrap;
}
.admin-badge.warning {
  border-color:#e8c780;
  background:#fff8e6;
  color:#765b17;
}


/* Ver.0.1.22 NAS hotfix8: line strategy / post-clear big game */
.big-game-tag {
  display:inline-flex;
  margin-left:8px;
  padding:4px 8px;
  border-radius:999px;
  background:#fff1cf;
  border:1px solid #e8c06c;
  color:#6d4b08;
  font-size:11px;
  font-weight:900;
}
.big-game-setup-card,
.big-game-tackle-banner,
.big-game-result-banner {
  margin:12px 0;
  padding:14px;
  border:1px solid #d9b45c;
  border-radius:14px;
  background:linear-gradient(180deg,#fffaf0,#fff4d9);
}
.big-game-setup-head,
.big-game-tackle-banner > div {
  display:flex;
  flex-wrap:wrap;
  gap:8px 12px;
  align-items:center;
}
.big-game-setup-head span,
.big-game-tackle-banner > div span {
  font-size:10px;
  font-weight:900;
  letter-spacing:.08em;
  color:#8a650e;
}
.big-game-setup-head strong,
.big-game-tackle-banner > div strong,
.big-game-result-banner strong {
  color:#4c3505;
}
.big-game-setup-stats {
  display:flex;
  flex-wrap:wrap;
  gap:7px;
  margin:9px 0;
}
.big-game-setup-stats span {
  padding:6px 9px;
  border-radius:999px;
  background:#fff;
  border:1px solid #ead49a;
  font-size:11px;
  font-weight:800;
}
.line-strategy-card {
  margin:12px 0;
  padding:14px;
  border:1px solid #b9d7df;
  border-radius:14px;
  background:#f7fcfd;
}
.line-strategy-head {
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:center;
}
.line-strategy-head span {
  color:var(--muted);
  font-size:10px;
}
.line-strategy-grid {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
  margin:10px 0;
}
.line-strategy-grid div {
  padding:9px;
  border-radius:10px;
  background:#fff;
  border:1px solid #dcecef;
}
.line-strategy-grid span,
.line-strategy-grid strong {
  display:block;
}
.line-strategy-grid span {
  font-size:10px;
  color:var(--muted);
}
.line-strategy-grid strong {
  margin-top:3px;
  font-size:14px;
}
.big-game-cost-card {
  border-color:#d6ad4f;
  box-shadow:0 0 0 2px rgba(214,173,79,.08);
}
.big-game-recommended {
  border-color:#d6ad4f;
  background:#fffaf0;
}
.big-game-result-banner {
  display:grid;
  gap:4px;
}
.big-game-result-banner span,
.big-game-result-banner small {
  display:block;
}
@media(max-width:700px) {
  .line-strategy-grid {
    grid-template-columns:1fr;
  }
  .big-game-setup-head,
  .line-strategy-head {
    align-items:flex-start;
    flex-direction:column;
  }
}


/* Ver.0.1.22 NAS hotfix11: fish-value editor and post-trip tackle review */
.market-editor-grid {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(300px,1fr));
  gap:14px;
  margin-top:14px;
}
.market-editor-card {
  border:1px solid #d9e5ea;
  border-radius:14px;
  padding:14px;
  background:#fff;
}
.market-editor-head,
.market-current-value,
.market-source-row {
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:flex-start;
}
.market-editor-head strong {
  display:block;
  font-size:18px;
}
.market-editor-head small {
  color:var(--muted);
}
.market-value-badges {
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  justify-content:flex-end;
}
.market-current-value {
  margin:10px 0 6px;
  padding:10px;
  border-radius:10px;
  background:#f6fafb;
}
.market-current-value strong {
  font-size:18px;
}
.market-source-row {
  flex-wrap:wrap;
  font-size:12px;
  color:var(--muted);
  margin-bottom:10px;
}
.market-fish-form {
  display:grid;
  gap:9px;
}
.market-fish-form label {
  display:grid;
  gap:4px;
  font-size:13px;
  font-weight:700;
}
.market-fish-form input,
.market-fish-form select {
  width:100%;
  min-width:0;
}
.market-fish-form .market-checkbox {
  display:flex;
  flex-direction:row;
  align-items:center;
  gap:8px;
}
.market-fish-form .market-checkbox input {
  width:auto;
}
.tackle-evaluation {
  margin:18px 0;
  padding:16px;
  border:1px solid #d9e5ea;
  border-radius:16px;
  background:#fbfdfe;
}
.tackle-evaluation-head {
  display:flex;
  justify-content:space-between;
  gap:16px;
  align-items:flex-start;
}
.tackle-overall-grade {
  min-width:100px;
  text-align:center;
  padding:10px 14px;
  border-radius:14px;
  background:#eef7fa;
}
.tackle-overall-grade strong {
  display:block;
  font-size:30px;
  line-height:1;
}
.tackle-overall-grade span,
.tackle-overall-grade small {
  display:block;
}
.tackle-evaluation-grid {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:10px;
  margin-top:12px;
}
.tackle-evaluation-item {
  border:1px solid #dce7eb;
  border-radius:12px;
  padding:12px;
  background:#fff;
}
.tackle-evaluation-title {
  display:flex;
  justify-content:space-between;
  gap:8px;
  margin-bottom:8px;
}
.tackle-evaluation-title span {
  font-weight:800;
}
.tackle-evaluation-title strong {
  font-size:12px;
}
.tackle-evaluation-item > b,
.tackle-evaluation-item > small {
  display:block;
}
.tackle-evaluation-item p {
  margin:8px 0 0;
  font-size:12px;
}
.recommended-gear-note {
  margin-top:8px;
  padding:7px 8px;
  border-radius:8px;
  background:#f7f7f7;
  font-size:12px;
}
.recommended-gear-note.matched {
  font-weight:800;
}
.catch-sale-value .sale-channel-label {
  display:block;
  margin-top:5px;
  font-weight:800;
}
.catch-sale-value small {
  display:block;
}
@media(max-width:700px) {
  .market-editor-grid,
  .tackle-evaluation-grid {
    grid-template-columns:1fr;
  }
  .tackle-evaluation-head {
    flex-direction:column;
  }
  .tackle-overall-grade {
    width:100%;
  }
}


/* Ver.0.1.22 NAS hotfix13: split external-reference refresh */
.economy-refresh-actions {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(230px,1fr));
  gap:12px;
  margin:14px 0 18px;
}
.refresh-action-card {
  position:relative;
  border:1px solid #d8e5ea;
  border-radius:14px;
  padding:14px;
  background:#fff;
}
.refresh-action-card h3 {
  margin:2px 0 8px;
}
.refresh-action-card p {
  margin:6px 0 10px;
}
.refresh-step {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:28px;
  height:28px;
  border-radius:999px;
  font-weight:800;
  background:#eef6f9;
}
.refresh-batch-buttons {
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.non-food-card {
  background:#fafafa;
}
.dns-diagnostic {
  margin-top:12px;
  padding:12px;
  border:1px solid #e2c87b;
  border-radius:10px;
  background:#fff9e8;
}
.dns-diagnostic p {
  margin:6px 0 0;
}
.diagnostic-detail {
  overflow-wrap:anywhere;
  white-space:normal;
}
.single-fish-refresh-form {
  margin-top:10px;
}
.single-fish-refresh-form .button {
  width:100%;
}
.non-food-refresh-note {
  margin-top:10px;
  padding:8px 10px;
  border-radius:8px;
  background:#f4f4f4;
  font-size:12px;
}
@media(max-width:700px) {
  .economy-refresh-actions {
    grid-template-columns:1fr;
  }
  .refresh-batch-buttons .button {
    width:100%;
  }
}


/* Ver.0.1.24: reusable outings / catch-reading pause */
.favorite-save-panel {
  margin:16px 0;
  padding:14px;
  border:1px solid var(--line);
  border-radius:16px;
  background:#f8fcfe;
}
.favorite-manage { margin-top:22px; }
.favorite-manage h2 { display:flex; gap:8px; align-items:baseline; }
.favorite-manage h2 small { color:var(--muted); font-size:13px; }
.favorite-list { display:grid; gap:10px; }
.favorite-item {
  display:flex;
  justify-content:space-between;
  gap:12px;
  padding:12px 14px;
  border:1px solid var(--line);
  border-radius:14px;
  background:#fff;
}
.favorite-item strong,
.favorite-item span,
.favorite-item small { display:block; }
.favorite-item span { margin-top:3px; }
.favorite-item small { margin-top:4px; color:var(--muted); }
.favorite-item-actions { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.favorite-item-actions form { margin:0; }
.danger-lite { border-color:#e1a8ad; color:#8c202b; background:#fff7f7; }
.favorite-save-form { display:grid; gap:10px; }
.favorite-save-form input[type="text"] { width:100%; }
.checkbox-row { display:flex !important; gap:8px; align-items:center; }
.checkbox-row input { width:auto; }
.result-pop {
  inset:0;
  left:0;
  top:0;
  width:auto;
  max-width:none;
  padding:18px;
  border:0;
  border-radius:0;
  background:rgba(3,30,47,.54);
  display:flex;
  align-items:center;
  justify-content:center;
  pointer-events:auto;
  z-index:80;
  text-align:left;
}
.result-pop[hidden] { display:none !important; }
.catch-reading-card {
  width:min(560px, calc(100vw - 28px));
  max-height:calc(100vh - 32px);
  overflow:auto;
  background:rgba(255,255,255,.99);
  border:2px solid #cfe4ee;
  border-radius:20px;
  padding:18px;
  box-shadow:0 18px 54px rgba(0,0,0,.28);
}
.catch-reading-card img {
  width:112px;
  height:88px;
  object-fit:contain;
}
.catch-reading-card h2 { font-size:27px; }
.catch-reading-card .size { font-size:20px; }
.catch-reading-card .mini-note {
  font-size:16px;
  line-height:1.65;
  color:#334f60;
  margin:14px 0;
}
.catch-pause-label {
  display:inline-block;
  margin-bottom:10px;
  padding:6px 10px;
  border-radius:999px;
  background:#e8f8ef;
  color:#16613b;
  font-weight:900;
}
.catch-reading-actions {
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:14px;
}
.catch-reading-help {
  display:block;
  margin-top:10px;
  color:var(--muted);
  line-height:1.5;
}
.game-hud.paused #timer::after {
  content:" 停止中";
  font-size:11px;
  color:#c9f4d7;
}
.game-reading-pause .wave { animation-play-state:paused; }

.game-detail-pause-banner {
  position:sticky;
  top:6px;
  z-index:40;
  display:flex;
  justify-content:space-between;
  gap:14px;
  align-items:center;
  margin:0 0 14px;
  padding:12px 14px;
  border:2px solid #8bd2a8;
  border-radius:14px;
  background:#eefbf3;
  box-shadow:0 5px 18px rgba(0,0,0,.08);
}
.game-detail-pause-banner strong,
.game-detail-pause-banner span { display:block; }
.game-detail-pause-banner span { margin-top:3px; color:#365b48; font-size:14px; }

@media (max-width:700px) {
  .favorite-item,
  .game-detail-pause-banner { flex-direction:column; align-items:stretch; }
  .favorite-item-actions { justify-content:flex-start; }
  .catch-reading-card { padding:15px; }
  .catch-reading-card img { width:92px; height:72px; }
  .catch-reading-card h2 { font-size:23px; }
  .catch-reading-actions .button { flex:1 1 100%; text-align:center; }
}


/* Ver.0.1.25 game visual asset system */
.game-background-img {
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  z-index:0;
  pointer-events:none;
}
.sea-stage.has-custom-background .sky,
.sea-stage.has-custom-background .sun {
  opacity:0;
}
.sea-stage .sky,
.sea-stage .sun {
  transition:opacity .5s ease;
}
.boat-game-image {
  width:min(24%, 210px);
  height:auto;
  max-height:32%;
  object-fit:contain;
  font-size:0;
}
.rod-skin-image {
  /* Legacy cached markup: do not render a fixed rod image behind the live rod. */
  display:none;
}
.rod-skin-canvas {
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  z-index:1;
  pointer-events:none;
}
.rod-svg-wrap #rod-svg {
  position:relative;
  z-index:2;
}
.rod-svg-wrap.has-animated-rod-skin #rod-path {
  opacity:.34;
  stroke-width:5.5;
}
.rod-svg-wrap.has-animated-rod-skin #rod-shadow {
  opacity:.24;
}
.rod-svg-wrap.has-animated-rod-skin #rod-guides circle {
  opacity:.72;
}
.game-visual-time {
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:baseline;
  justify-content:flex-end;
  margin-top:7px;
  font-size:13px;
  color:#527184;
}
.game-visual-time strong {
  font-size:16px;
  color:#123d57;
}
.visual-admin-section h2 { margin-bottom:8px; }
.visual-upload-card {
  display:flex;
  flex-direction:column;
  gap:10px;
  border:1px solid var(--line);
  background:#fbfeff;
  border-radius:16px;
  padding:14px;
}
.visual-upload-card label,
.visual-background-form label {
  display:flex;
  flex-direction:column;
  gap:6px;
  font-weight:800;
}
.visual-background-form {
  display:grid;
  grid-template-columns:minmax(140px,.8fr) minmax(140px,.8fr) minmax(220px,1.5fr) auto;
  gap:12px;
  align-items:end;
}
.visual-asset-grid {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:14px;
}
.visual-asset-card {
  display:flex;
  flex-direction:column;
  gap:8px;
  padding:12px;
  border:1px solid var(--line);
  border-radius:16px;
  background:#fbfeff;
}
.visual-preview-wrap {
  aspect-ratio:16/9;
  border-radius:12px;
  overflow:hidden;
  background:#eaf4f8;
}
.visual-preview-wrap img {
  width:100%;
  height:100%;
  object-fit:contain;
}
.visual-asset-card small {
  color:#5b7482;
  overflow-wrap:anywhere;
}
@media (max-width: 760px) {
  .visual-background-form { grid-template-columns:1fr; }
  .boat-game-image { width:min(34%, 180px); }
}


/* Ver.0.1.26: catch-reading viewport guard.
   Legacy .result-pop rules used translate(-50%,-50%); the full-screen overlay
   must explicitly cancel that transform or Safari/desktop shifts half of the
   dialog outside the viewport. */
.result-pop {
  transform:none;
  box-sizing:border-box;
  width:100vw;
  height:100vh;
  height:100dvh;
  max-width:none;
  max-height:100dvh;
  overflow:auto;
  overscroll-behavior:contain;
}
.catch-reading-card {
  margin:auto;
  box-sizing:border-box;
}
@media (max-width:700px) {
  .result-pop {
    padding:max(10px, env(safe-area-inset-top))
            max(10px, env(safe-area-inset-right))
            max(10px, env(safe-area-inset-bottom))
            max(10px, env(safe-area-inset-left));
  }
}

/* Ver.0.1.26: save the selected tackle before departure. */
.pretrip-favorite-box {
  margin:20px 0 16px;
  padding:16px;
  border:1px solid #cfe3ed;
  border-radius:16px;
  background:#f5fbfe;
}
.pretrip-favorite-head > div {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.pretrip-favorite-head strong { font-size:18px; }
.pretrip-favorite-head span {
  color:var(--muted);
  font-weight:800;
  white-space:nowrap;
}
.pretrip-favorite-head p {
  margin:8px 0 12px;
  color:var(--muted);
  line-height:1.55;
}
.pretrip-favorite-controls {
  display:grid;
  grid-template-columns:minmax(220px,1fr) auto auto;
  align-items:end;
  gap:12px;
}
.pretrip-favorite-controls label {
  margin:0;
}
.favorite-default-check {
  min-height:48px;
  display:flex !important;
  flex-direction:row !important;
  align-items:center;
  gap:8px;
  font-weight:800;
}
.favorite-default-check input {
  width:auto;
  margin:0;
}
.favorite-save-button {
  min-height:48px;
  white-space:nowrap;
}
.compact-success { margin:10px 0; }
@media (max-width:760px) {
  .pretrip-favorite-controls {
    grid-template-columns:1fr;
    align-items:stretch;
  }
  .favorite-save-button {
    width:100%;
  }
}


/* Ver.0.1.28: compact game-visual library */
.visual-library-title-row {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
}
.visual-library-title-row h2 { margin-bottom:4px; }
.visual-library-total {
  flex:0 0 auto;
  padding:7px 11px;
  border-radius:999px;
  background:#e7f5fb;
  color:#0b668c;
  font-size:13px;
}
.visual-library-toolbar {
  display:grid;
  grid-template-columns:minmax(220px,1.4fr) minmax(130px,.6fr) minmax(190px,.9fr) auto;
  gap:10px;
  align-items:end;
  margin:14px 0 16px;
  padding:12px;
  border:1px solid var(--line);
  border-radius:14px;
  background:#f7fbfd;
}
.visual-library-toolbar label {
  display:flex;
  flex-direction:column;
  gap:5px;
  margin:0;
  font-size:12px;
  font-weight:800;
  color:#476779;
}
.visual-library-toolbar input,
.visual-library-toolbar select {
  min-height:42px;
  margin:0;
}
.visual-library-count {
  min-width:78px;
  padding:10px 4px;
  text-align:right;
  font-weight:900;
  color:#31596d;
  white-space:nowrap;
}
.visual-compact-grid {
  grid-template-columns:repeat(auto-fill,minmax(142px,1fr));
  gap:10px;
}
.visual-compact-card {
  position:relative;
  gap:6px;
  padding:8px;
  min-width:0;
  border-radius:13px;
}
.visual-thumb-button {
  display:block;
  width:100%;
  padding:0;
  margin:0;
  border:0;
  border-radius:10px;
  overflow:hidden;
  aspect-ratio:4/3;
  background:#e9f3f7;
  cursor:zoom-in;
  box-shadow:inset 0 0 0 1px rgba(10,80,110,.08);
}
.visual-thumb-button img {
  display:block;
  width:100%;
  height:100%;
  object-fit:contain;
}
.visual-type-background .visual-thumb-button img {
  object-fit:cover;
}
.visual-thumb-button:hover,
.visual-thumb-button:focus-visible {
  outline:3px solid rgba(20,143,188,.35);
  outline-offset:1px;
}
.visual-compact-body {
  min-width:0;
}
.visual-compact-heading {
  display:flex;
  align-items:center;
  gap:6px;
  min-width:0;
}
.visual-compact-heading strong {
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:13px;
}
.visual-kind-badge {
  flex:0 0 auto;
  padding:2px 6px;
  border-radius:999px;
  background:#e6f4fa;
  color:#09688d;
  font-size:10px;
  font-weight:900;
}
.visual-compact-card small {
  display:block;
  margin-top:4px;
  font-size:10px;
  line-height:1.3;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.visual-compact-delete-form {
  margin-top:auto;
}
.visual-compact-delete {
  width:100%;
  min-height:34px;
  padding:6px 8px;
  font-size:12px;
}
.visual-lightbox {
  position:fixed;
  inset:0;
  z-index:10050;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:max(14px, env(safe-area-inset-top))
          max(14px, env(safe-area-inset-right))
          max(14px, env(safe-area-inset-bottom))
          max(14px, env(safe-area-inset-left));
}
.visual-lightbox[hidden] { display:none; }
.visual-lightbox-backdrop {
  position:absolute;
  inset:0;
  border:0;
  margin:0;
  padding:0;
  background:rgba(2,18,29,.76);
  cursor:zoom-out;
}
.visual-lightbox-panel {
  position:relative;
  z-index:1;
  width:min(1000px,94vw);
  max-height:92vh;
  max-height:92dvh;
  overflow:auto;
  padding:16px;
  border-radius:18px;
  background:#fff;
  box-shadow:0 26px 80px rgba(0,0,0,.34);
}
.visual-lightbox-image-wrap {
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:220px;
  max-height:72vh;
  border-radius:13px;
  overflow:hidden;
  background:#eaf4f8;
}
.visual-lightbox-image-wrap img {
  display:block;
  max-width:100%;
  max-height:72vh;
  object-fit:contain;
}
.visual-lightbox-panel h3 {
  margin:12px 44px 2px 0;
}
.visual-lightbox-close {
  position:absolute;
  right:12px;
  top:10px;
  z-index:2;
  width:40px;
  height:40px;
  border:0;
  border-radius:50%;
  background:rgba(10,38,53,.85);
  color:#fff;
  font-size:27px;
  line-height:1;
  cursor:pointer;
}
body.visual-lightbox-open { overflow:hidden; }

@media (max-width:760px) {
  .visual-library-title-row {
    flex-direction:column;
    gap:6px;
  }
  .visual-library-toolbar {
    grid-template-columns:1fr 1fr;
  }
  .visual-library-toolbar label:first-child {
    grid-column:1 / -1;
  }
  .visual-library-count {
    text-align:left;
  }
  .visual-compact-grid {
    grid-template-columns:repeat(auto-fill,minmax(118px,1fr));
    gap:8px;
  }
  .visual-compact-card {
    padding:7px;
  }
}
@media (max-width:460px) {
  .visual-library-toolbar { grid-template-columns:1fr; }
  .visual-library-toolbar label:first-child { grid-column:auto; }
  .visual-compact-grid {
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}


/* Ver.0.1.30: custom rod skin is the visible rod.
   Keep SVG geometry for animation math, but do not draw a second rod over it. */
.rod-svg-wrap.has-animated-rod-skin #rod-path,
.rod-svg-wrap.has-animated-rod-skin #rod-shadow,
.rod-svg-wrap.has-animated-rod-skin #rod-guides circle,
.rod-svg-wrap.has-animated-rod-skin #tip-dot {
  opacity:0 !important;
  filter:none !important;
}
/* Ver.0.1.97: custom rod skins draw their fishing line on the same canvas
   as the rod, anchored to the actual rendered tip.  Hide the duplicate SVG line. */
.rod-svg-wrap.has-animated-rod-skin #line-path {
  opacity:0 !important;
  stroke-width:0 !important;
  filter:none !important;
}
.rod-svg-wrap.has-animated-rod-skin #line-path.slack {
  opacity:0 !important;
  stroke-width:0 !important;
}

/* Ver.0.1.30: split backup / recovery admin */
.backup-summary-grid,
.backup-kind-grid {
  display:grid;
  gap:14px;
}
.backup-summary-grid {
  grid-template-columns:repeat(3,minmax(0,1fr));
  margin:18px 0;
}
.backup-summary-card,
.backup-kind-card {
  border:1px solid var(--line);
  border-radius:16px;
  background:#fbfeff;
  padding:16px;
}
.backup-summary-card {
  display:flex;
  flex-direction:column;
  gap:5px;
}
.backup-summary-card > span {
  color:var(--muted);
  font-size:13px;
  font-weight:900;
}
.backup-summary-card > strong {
  font-size:clamp(22px,3vw,32px);
  color:#123d57;
}
.backup-summary-card > small {
  color:var(--muted);
  line-height:1.5;
}
.backup-create-form {
  margin:18px 0 8px;
}
.backup-create-button {
  width:min(100%,460px);
  min-height:54px;
  font-size:17px;
}
.backup-kind-grid {
  grid-template-columns:repeat(2,minmax(0,1fr));
  margin-top:16px;
}
.backup-kind-card h3 {
  margin-top:0;
}
.backup-kind-card ul {
  margin:10px 0 0;
  padding-left:1.3em;
  line-height:1.7;
}
.backup-kind-card.program {
  border-top:4px solid #4c8ca9;
}
.backup-kind-card.data {
  border-top:4px solid #c58a36;
}
.backup-restore-steps {
  display:grid;
  gap:10px;
  padding-left:1.4em;
  line-height:1.65;
}
.backup-list-head {
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
}
.backup-dir-label {
  max-width:50%;
  color:var(--muted);
  font-size:12px;
  overflow-wrap:anywhere;
}
.backup-file-list {
  display:grid;
  gap:9px;
  margin:16px 0;
}
.backup-file-row {
  display:grid;
  grid-template-columns:88px minmax(0,1fr) auto;
  gap:12px;
  align-items:center;
  padding:11px 12px;
  border:1px solid var(--line);
  border-radius:14px;
  background:#fbfeff;
}
.backup-file-kind {
  display:flex;
  justify-content:center;
  align-items:center;
  min-height:34px;
  border-radius:10px;
  font-size:11px;
  font-weight:1000;
  letter-spacing:.08em;
  background:#eaf4f8;
  color:#245c75;
}
.backup-file-kind.data {
  background:#fff3df;
  color:#7a5517;
}
.backup-file-info {
  display:flex;
  flex-direction:column;
  gap:2px;
  min-width:0;
}
.backup-file-info code {
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:12px;
}
.backup-file-info small {
  color:var(--muted);
}
.backup-command {
  padding:12px 14px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#f6fafc;
  overflow-x:auto;
}
.empty-state {
  padding:18px;
  text-align:center;
  color:var(--muted);
  background:#f7fafb;
  border-radius:14px;
}

@media (max-width: 760px) {
  .backup-summary-grid,
  .backup-kind-grid {
    grid-template-columns:1fr;
  }
  .backup-file-row {
    grid-template-columns:72px minmax(0,1fr);
  }
  .backup-file-row .button {
    grid-column:1 / -1;
    width:100%;
  }
  .backup-list-head {
    flex-direction:column;
  }
  .backup-dir-label {
    max-width:100%;
  }
}

/* Ver.0.1.31: randomized recommendation + pre-trip hint */
.recommended-action-row {
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  justify-content:flex-end;
}
.fishing-hint-box {
  grid-column:1 / -1;
  margin:2px 0 0;
  font-weight:700;
  line-height:1.55;
}
.big-game-fixed-price-card {
  border-color:#d6ad4f;
  background:#fffaf0;
}
@media (max-width:680px) {
  .recommended-action-row {
    width:100%;
    display:grid;
    grid-template-columns:1fr;
  }
  .recommended-action-row .button {
    width:100%;
  }
}


/* Ver.0.1.32-mac-r1: achievement / story foundation */
.achievement-header { position: relative; overflow: hidden; }
.achievement-progress { display:flex; align-items:baseline; gap:.45rem; margin:.8rem 0 1rem; }
.achievement-progress strong { font-size:2rem; }
.achievement-filters { display:flex; gap:.5rem; flex-wrap:wrap; }
.achievement-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:1rem; }
.achievement-card { display:flex; flex-direction:column; min-height:100%; }
.achievement-card.locked { opacity:.78; }
.achievement-image { aspect-ratio:4/3; border-radius:14px; overflow:hidden; display:flex; align-items:center; justify-content:center; background:rgba(127,127,127,.08); margin-bottom:.75rem; }
.achievement-image img { width:100%; height:100%; object-fit:contain; object-position:center; display:block; background:rgba(127,127,127,.04); }
.achievement-image span { font-size:3rem; }
.achievement-condition { font-weight:700; }
.achievement-unlock { text-align:center; }
.story-list { display:grid; gap:1rem; }
.story-list-card { display:grid; grid-template-columns:minmax(120px,220px) 1fr; gap:1rem; align-items:center; }
.story-list-card > img { width:100%; aspect-ratio:4/3; object-fit:cover; border-radius:14px; }
.story-list-card.locked { opacity:.7; }
.story-placeholder { min-height:140px; border-radius:14px; display:flex; align-items:center; justify-content:center; background:rgba(127,127,127,.08); font-size:3rem; }
.story-reader { max-width:860px; margin-inline:auto; }
.story-hero-image { width:100%; max-height:480px; object-fit:cover; border-radius:18px; margin-bottom:1rem; }
.story-body { white-space:pre-wrap; line-height:1.9; margin:1.5rem 0 2rem; font-size:1.02rem; }
.section-heading-row { display:flex; align-items:center; justify-content:space-between; gap:1rem; }
.admin-master-list { display:grid; gap:.75rem; }
.admin-master-row { display:grid; grid-template-columns:88px 1fr auto; gap:1rem; align-items:center; padding:.8rem; border:1px solid rgba(127,127,127,.18); border-radius:14px; }
.admin-master-row.is-disabled { opacity:.58; }
.admin-master-thumb { width:88px; height:66px; display:flex; align-items:center; justify-content:center; overflow:hidden; border-radius:10px; background:rgba(127,127,127,.08); font-size:2rem; }
.admin-master-thumb img { width:100%; height:100%; object-fit:contain; object-position:center; background:rgba(127,127,127,.04); }
.admin-master-main h3 { margin:.2rem 0; }
.admin-master-main p { margin:.2rem 0; }
.admin-master-actions { display:flex; flex-direction:column; gap:.4rem; min-width:110px; }
.admin-master-actions form { margin:0; }
.admin-settings-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1rem; }
.admin-edit-form { display:grid; gap:1rem; }
.admin-check-grid { display:flex; gap:1rem; flex-wrap:wrap; }
.managed-image-preview { display:flex; gap:1rem; align-items:center; }
.managed-image-preview img { width:180px; max-height:140px; object-fit:cover; border-radius:12px; }
.managed-image-preview.story img { width:min(320px,100%); max-height:220px; }
.button.danger { border-color:#b64545; }

@media (max-width: 720px) {
  .achievement-grid { grid-template-columns:1fr; }
  .story-list-card { grid-template-columns:1fr; }
  .admin-master-row { grid-template-columns:64px 1fr; }
  .admin-master-thumb { width:64px; height:64px; }
  .admin-master-actions { grid-column:1 / -1; flex-direction:row; flex-wrap:wrap; }
  .admin-settings-grid { grid-template-columns:1fr; }
  .achievement-filters { overflow-x:auto; flex-wrap:nowrap; padding-bottom:.25rem; }
  .achievement-filters .button { flex:0 0 auto; }
}


/* v0.1.33 profile / achievement-story management */
.profile-name-link{color:inherit;text-decoration:none}
.profile-name-link:hover{text-decoration:underline}
.profile-title-inline,.profile-title-main{font-weight:800;color:#8b5e00}
.profile-hero{overflow:hidden}
.profile-hero-grid{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(240px,.8fr);gap:24px;align-items:center}
.profile-display-name{line-height:1.25}
.profile-stat-strip{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-top:18px}
.profile-stat-strip>div,.profile-summary-grid>div{background:rgba(0,0,0,.035);border-radius:12px;padding:12px;display:flex;flex-direction:column;gap:3px}
.profile-stat-strip strong{font-size:1.45rem}
.profile-stat-strip small,.profile-summary-grid small{opacity:.72}
.profile-frame-wrap{display:flex;justify-content:center}
.profile-fish-frame{width:min(100%,390px);aspect-ratio:4/3;padding:14px;border:10px solid #6b4a2b;border-radius:5px;background:#efe5c8;box-shadow:inset 0 0 0 3px #c39b5d,0 8px 24px rgba(0,0,0,.18);position:relative;overflow:hidden}
.profile-fish-frame img{width:100%;height:100%;object-fit:contain;background:#eef7f9}
.profile-frame-caption{position:absolute;left:20px;right:20px;bottom:20px;background:rgba(255,255,255,.9);padding:7px 10px;border-radius:8px;display:flex;justify-content:space-between;gap:8px;font-size:.86rem}
.profile-frame-empty{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:3rem;gap:10px}
.profile-frame-empty span{font-size:.9rem}
.profile-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.profile-summary-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.profile-summary-grid span{font-size:.8rem;opacity:.7}
.profile-summary-grid strong{font-size:1.05rem}
.profile-details{margin-top:12px;border-top:1px solid rgba(0,0,0,.1);padding-top:10px}
.profile-details summary{cursor:pointer;font-weight:800;padding:8px 0}
.profile-edit-grid{display:grid;grid-template-columns:1fr 1fr auto;gap:12px;align-items:end}
.profile-edit-grid label{display:flex;flex-direction:column;gap:6px}
.profile-achievement-preview,.profile-fish-preview{display:flex;gap:8px;flex-wrap:wrap}
.profile-achievement-preview span,.profile-fish-preview span{background:rgba(0,0,0,.05);border-radius:999px;padding:7px 10px}
.profile-full-list{display:grid;gap:8px}
.profile-full-list>div{padding:10px;border-radius:10px;background:rgba(0,0,0,.035)}
.profile-full-list small{display:block;opacity:.7}
.profile-full-list p{margin:.3rem 0 0}
.profile-table-wrap{overflow-x:auto}
.profile-table{width:100%;border-collapse:collapse}
.profile-table th,.profile-table td{padding:9px;border-bottom:1px solid rgba(0,0,0,.08);text-align:left}
.achievement-search-bar{display:grid;grid-template-columns:minmax(170px,2fr) repeat(3,minmax(120px,1fr)) auto auto;gap:8px;margin:12px 0 18px}
.gpt-guide-list{display:grid;gap:10px}
.gpt-guide{border:1px solid rgba(0,0,0,.1);border-radius:12px;padding:10px}
.gpt-guide summary{cursor:pointer;font-weight:800}
.gpt-guide textarea{width:100%;margin:8px 0;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:.85rem}
.story-body-preview{white-space:pre-wrap;opacity:.75;font-size:.88rem}

@media (max-width:760px){
  .profile-hero-grid,.profile-grid{grid-template-columns:1fr}
  .profile-stat-strip{grid-template-columns:1fr 1fr}
  .profile-edit-grid{grid-template-columns:1fr}
  .achievement-search-bar{grid-template-columns:1fr 1fr}
  .achievement-search-bar input{grid-column:1/-1}
  .profile-frame-caption{flex-direction:column}
}
@media (max-width:420px){
  .profile-stat-strip,.profile-summary-grid,.achievement-search-bar{grid-template-columns:1fr}
}


/* Ver.0.1.34 admin information architecture */
.admin-collapse{
  border:1px solid rgba(0,0,0,.10);
  border-radius:12px;
  margin:10px 0;
  overflow:hidden;
}
.admin-collapse>summary{
  cursor:pointer;
  font-weight:800;
  padding:14px 16px;
  list-style-position:inside;
}
.admin-collapse[open]>summary{
  border-bottom:1px solid rgba(0,0,0,.08);
  background:rgba(0,0,0,.025);
}
.admin-collapse-body{padding:14px 16px}
.admin-collapse-body textarea{
  width:100%;
  box-sizing:border-box;
  font-family:ui-monospace,SFMono-Regular,Menlo,monospace;
  font-size:.86rem;
}
.admin-transfer-actions{
  display:grid;
  grid-template-columns:auto minmax(260px,1fr);
  gap:12px;
  align-items:end;
  margin:14px 0;
}
.admin-transfer-actions form{display:flex;gap:8px;align-items:end;flex-wrap:wrap}
.admin-fish-summary{
  cursor:pointer;
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:center;
  font-weight:800;
}
.admin-fish-summary small{font-weight:500;opacity:.7;text-align:right}

@media(max-width:760px){
  .admin-transfer-actions{grid-template-columns:1fr}
  .admin-fish-summary{align-items:flex-start;flex-direction:column}
  .admin-fish-summary small{text-align:left}
}


/* Ver.0.1.35 game home / compact navigation / content transfer */
.portal-main-nav { gap:.55rem; align-items:center; }
.game-home-hero {
  display:flex; gap:1rem; align-items:center; justify-content:space-between;
}
.game-home-start { font-size:1.25rem; padding:.95rem 1.35rem; white-space:nowrap; }
.game-home-stats {
  display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:.75rem; margin:1rem 0;
}
.compact-stat { display:flex; flex-direction:column; gap:.25rem; }
.compact-stat strong { font-size:1.35rem; }
.game-home-actions { display:flex; flex-wrap:wrap; gap:.6rem; }
.ranking-home-grid {
  display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:.8rem; margin:1rem 0;
}
.ranking-home-card {
  display:flex; flex-direction:column; gap:.35rem; text-decoration:none;
  padding:1rem; border:1px solid #d7dde2; border-radius:14px; background:#fff;
}
.ranking-home-card strong { font-size:1.08rem; }
.group-transfer-box {
  margin:.8rem 0 1rem; padding:.85rem; border:1px dashed #aebbc5;
  border-radius:12px; background:rgba(245,248,250,.8);
}
.admin-fish-name-row {
  display:grid; grid-template-columns:minmax(180px,1fr) minmax(360px,2fr);
  gap:.75rem; align-items:center;
}
.admin-fish-name-row > div { display:flex; flex-direction:column; gap:.2rem; }
.admin-name-image-form {
  display:grid; grid-template-columns:auto minmax(150px,1fr) auto;
  gap:.45rem; align-items:center;
}
.admin-fish-details { margin-top:.7rem; }
.admin-fish-details > summary { cursor:pointer; font-weight:700; }

@media (max-width: 760px) {
  .game-home-hero { align-items:stretch; flex-direction:column; }
  .game-home-start { text-align:center; width:100%; }
  .game-home-stats { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .ranking-home-grid { grid-template-columns:1fr; }
  .admin-fish-name-row { grid-template-columns:1fr; }
  .admin-name-image-form { grid-template-columns:1fr; }
  .portal-main-nav { position:sticky; top:0; z-index:15; }
}


/* Ver.0.1.36 fish admin layout / profile records / chapter2 lock */
.admin-fish-name-row {
  display:block;
}
.admin-fish-name-row > div {
  margin-bottom:.65rem;
}
.admin-name-image-form {
  display:grid;
  grid-template-columns:minmax(92px,120px) minmax(0,1fr) auto;
  gap:.55rem;
  align-items:center;
  width:100%;
}
.admin-name-image-form input[type="file"] {
  min-width:0;
  width:100%;
  max-width:100%;
}
.admin-name-image-form .button {
  white-space:nowrap;
}
.profile-trip-record a {
  display:inline-block;
  margin-top:.2rem;
  font-size:.88rem;
}
.profile-table-wrap {
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
}
.profile-table th,
.profile-table td {
  white-space:nowrap;
}
.gear-lock-notice,
.chapter2-debt-notice {
  margin:1rem 0;
}
@media (max-width:760px) {
  .admin-name-image-form {
    grid-template-columns:1fr;
  }
  .admin-name-image-form .button,
  .admin-name-image-form select,
  .admin-name-image-form input[type="file"] {
    width:100%;
  }
}


/* Ver.0.1.37 account administration */
.account-list { display:grid; gap:.7rem; }
.account-row {
  display:flex; justify-content:space-between; gap:1rem; align-items:center;
  padding:.9rem; border:1px solid #d7dde2; border-radius:14px; background:#fff;
}
.account-row.is-test { border-style:dashed; }
.account-row.is-deleted { background:#faf7f7; }
.account-main { display:flex; flex-direction:column; gap:.22rem; min-width:0; }
.account-main strong { overflow-wrap:anywhere; }
.account-actions { display:flex; flex-wrap:wrap; gap:.45rem; align-items:center; }
.account-actions form { margin:0; }
.button.danger {
  background:#8d2d2d; color:#fff; border-color:#8d2d2d;
}
.test-account-grid {
  display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.75rem;
  margin:.8rem 0 1rem;
}
.test-account-card {
  display:flex; flex-direction:column; gap:.3rem; padding:.85rem;
  border:1px solid #d7dde2; border-radius:12px; background:#fff;
}
@media (max-width:760px) {
  .account-row { align-items:stretch; flex-direction:column; }
  .account-actions { width:100%; }
  .account-actions .button { width:100%; }
  .account-actions form { flex:1 1 100%; }
  .test-account-grid { grid-template-columns:1fr; }
}

/* Ver.0.1.38 version / account switch */
.version-info-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.75rem}
.version-info-grid>div{padding:.85rem;border:1px solid #dce3e8;border-radius:12px;display:flex;flex-direction:column;gap:.25rem}
.version-info-grid span{font-size:.86rem;opacity:.75}
.version-info-grid strong,.version-path-list code{overflow-wrap:anywhere}
@media(max-width:760px){.version-info-grid{grid-template-columns:1fr}}


/* Ver.0.1.39 chapter splash / full story art / visible gear locks */
.story-splash-shell{
  width:min(1180px,100%);
  margin:0 auto;
}
.story-splash-form{margin:0}
.story-splash-button{
  display:block;
  position:relative;
  width:100%;
  border:0;
  padding:0;
  background:transparent;
  cursor:pointer;
  border-radius:18px;
  overflow:hidden;
}
.story-splash-image{
  display:block;
  width:100%;
  height:auto;
  max-height:none;
  object-fit:contain;
  background:#06131d;
}
.story-splash-hint{
  position:absolute;
  left:50%;
  bottom:18px;
  transform:translateX(-50%);
  padding:.65rem 1rem;
  border-radius:999px;
  background:rgba(0,0,0,.72);
  color:#fff;
  font-weight:800;
  white-space:nowrap;
  box-shadow:0 4px 18px rgba(0,0,0,.25);
}
.story-splash-fallback{
  min-height:60vh;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:.7rem;
  background:linear-gradient(180deg,#0b3850,#071822);
  color:#fff;
}
.story-splash-fallback span{font-size:1.1rem;letter-spacing:.08em}
.story-splash-fallback strong{font-size:clamp(1.6rem,4vw,3.2rem)}
.story-hero-image{
  width:100%;
  height:auto;
  max-height:none;
  object-fit:contain;
  background:#06131d;
}
.locked-gear-note{
  display:block;
  color:#8a4b00;
  font-weight:700;
  margin-top:.35rem;
}
select optgroup[label^="🔒"]{
  color:#8a4b00;
  font-weight:700;
}
@media(max-width:760px){
  .story-splash-hint{
    bottom:10px;
    font-size:.88rem;
    max-width:90%;
    white-space:normal;
    text-align:center;
  }
}


/* Ver.0.1.40 story-flow test account generator */
.test-account-generator{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.8rem 1rem}
.test-account-generator label{display:flex;flex-direction:column;gap:.35rem;font-weight:700}
.test-account-generator .checkbox-line{flex-direction:row;align-items:center;font-weight:600}
.test-account-generator-actions{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:.6rem}
.test-balance-guide{align-self:end;padding:.7rem;border-radius:10px;background:#f4f8fa}
.ranking-test-toggle{display:flex;flex-wrap:wrap;align-items:center;gap:.6rem;margin-top:1rem;font-size:.9rem}
@media(max-width:760px){.test-account-generator{grid-template-columns:1fr}}

/* Ver.0.1.42 multi-image story */
.story-sequence-frame.is-hidden{display:none}
.story-sequence-frame{position:relative;width:100%}
.story-sequence-counter{position:absolute;top:.8rem;right:.8rem;background:rgba(0,0,0,.68);color:#fff;padding:.35rem .65rem;border-radius:999px;font-weight:800}
.story-reader-gallery{display:grid;gap:1rem;margin:1rem 0}
.story-reader-gallery figure{margin:0}
.story-reader-gallery figcaption{text-align:center;font-size:.9rem;opacity:.7;margin-top:.3rem}
.story-image-slot-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem}
.story-image-slot{display:flex;flex-direction:column;gap:.55rem;padding:.8rem;border:1px solid #d9e1e6;border-radius:12px}
.story-image-slot img{width:100%;height:180px;object-fit:contain;background:#f5f7f8;border-radius:10px}
.story-image-slot input[type=file]{width:100%;min-width:0}
@media(max-width:760px){.story-image-slot-grid{grid-template-columns:1fr}.story-image-slot img{height:auto;max-height:260px}}

/* Ver.0.1.97-nas-r4: live high-stakes mission progress only */
.mission-live-panel {
  margin:8px 0 10px;
  padding:10px;
  border:2px solid #d1a84d;
  border-radius:14px;
  background:#fffaf0;
}
.mission-live-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  margin-bottom:7px;
}
.mission-live-head span {
  font-size:12px;
  font-weight:900;
  color:#72520b;
}
.mission-live-head strong {
  font-size:14px;
  text-align:right;
}
.mission-live-row {
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  gap:8px;
  align-items:center;
  padding:8px;
  border-radius:10px;
  background:#fff;
  border:1px solid #ead8aa;
}
.mission-live-row + .mission-live-row {
  margin-top:6px;
}
.mission-live-row > div {
  min-width:0;
}
.mission-live-row small,
.mission-live-row strong {
  display:block;
  overflow-wrap:anywhere;
}
.mission-live-row small {
  color:var(--muted);
  font-size:10px;
}
.mission-live-row strong {
  margin-top:2px;
  font-size:13px;
}
.mission-live-row > b {
  white-space:nowrap;
  font-size:12px;
  color:#936d0a;
}
.mission-live-row.achieved {
  border-color:#8fc79f;
  background:#f1fbf4;
}
.mission-live-row.achieved > b {
  color:#277440;
}
.mission-live-badge {
  display:inline-flex;
  min-width:46px;
  justify-content:center;
  padding:4px 6px;
  border-radius:999px;
  background:#173f56;
  color:white;
  font-size:10px;
  font-weight:900;
}
.mission-live-subs {
  margin-top:6px;
}

@media (max-width:600px) {
  .mission-live-head {
    align-items:flex-start;
    flex-direction:column;
  }
  .mission-live-head strong {
    text-align:left;
  }
  .mission-live-row {
    grid-template-columns:auto minmax(0,1fr);
  }
  .mission-live-row > b {
    grid-column:2;
    justify-self:start;
  }
}



/* Ver.0.1.97-nas-r5: compact collapsible analytics */
.analytics-heading-compact h1 {
  margin-bottom:4px;
}
.analytics-heading-compact .lead {
  margin-top:4px;
}
.analytics-summary-compact {
  grid-template-columns:repeat(auto-fit,minmax(92px,1fr));
  gap:6px;
  margin:10px 0 12px;
}
.analytics-summary-compact .card {
  padding:8px 6px;
  border-radius:10px;
}
.analytics-summary-compact strong {
  font-size:18px;
}
.analytics-summary-compact span {
  margin-top:3px;
  font-size:11px;
}
.analytics-fold {
  overflow:hidden;
}
.analytics-filter-fold {
  margin-top:8px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#fbfdfe;
}
details.analytics-section-fold.card {
  padding:0;
}
.analytics-fold > summary {
  list-style:none;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  min-height:42px;
  padding:10px 13px;
  cursor:pointer;
  user-select:none;
}
.analytics-fold > summary::-webkit-details-marker {
  display:none;
}
.analytics-fold > summary::after {
  content:"＋";
  flex:0 0 auto;
  width:24px;
  height:24px;
  display:grid;
  place-items:center;
  border-radius:999px;
  background:#edf4f7;
  color:#315c70;
  font-weight:900;
  line-height:1;
}
.analytics-fold[open] > summary::after {
  content:"−";
}
.analytics-fold > summary > span:first-child {
  min-width:0;
}
.analytics-fold-title {
  display:block;
  font-weight:900;
  font-size:15px;
  color:var(--ink);
}
.analytics-fold-meta {
  margin-left:auto;
  color:var(--muted);
  font-size:11px;
  font-weight:800;
  white-space:nowrap;
}
.analytics-fold-body {
  border-top:1px solid var(--line);
  padding:10px 13px 13px;
}
.analytics-search-compact {
  margin-top:0;
  gap:8px 10px;
}
.analytics-search-compact label {
  font-size:12px;
}
.analytics-search-compact input,
.analytics-search-compact select {
  margin-top:3px;
}
.analytics-compact-note {
  margin:0 0 9px;
  line-height:1.45;
}

.analytics-stat-table {
  display:grid;
  gap:4px;
}
.analytics-stat-row {
  display:grid;
  grid-template-columns:minmax(170px,1.6fr) repeat(4,minmax(80px,1fr));
  gap:8px;
  align-items:center;
  padding:7px 9px;
  border:1px solid #e5edf0;
  border-radius:9px;
  background:#fbfdfe;
  font-size:12px;
}
.analytics-stat-row > span:not(:first-child) {
  text-align:right;
}
.analytics-stat-head {
  border:0;
  background:transparent;
  color:var(--muted);
  font-size:10px;
  font-weight:800;
  padding-top:2px;
  padding-bottom:2px;
}
.analytics-stat-row.risk-low { border-left:4px solid #79b895; }
.analytics-stat-row.risk-medium { border-left:4px solid #b6a861; }
.analytics-stat-row.risk-high { border-left:4px solid #c88287; }
.analytics-stat-row.challenge-nearshore { border-left:4px solid #4c9a83; }
.analytics-stat-row.challenge-world { border-left:4px solid #4f83aa; }

.analytics-mini-list,
.analytics-session-list-compact {
  display:grid;
  gap:6px;
  margin-top:8px;
}
.analytics-mini-details,
.analytics-session-item {
  border:1px solid var(--line);
  border-radius:10px;
  background:#fbfdfe;
  overflow:hidden;
}
.analytics-mini-details > summary,
.analytics-session-item > summary {
  list-style:none;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:8px 10px;
  cursor:pointer;
}
.analytics-mini-details > summary::-webkit-details-marker,
.analytics-session-item > summary::-webkit-details-marker {
  display:none;
}
.analytics-mini-details > summary::after,
.analytics-session-item > summary::after {
  content:"›";
  flex:0 0 auto;
  color:#547486;
  font-size:20px;
  font-weight:900;
  transform:rotate(0deg);
  transition:transform .12s ease;
}
.analytics-mini-details[open] > summary::after,
.analytics-session-item[open] > summary::after {
  transform:rotate(90deg);
}
.analytics-mini-main,
.analytics-session-summary-main {
  min-width:0;
}
.analytics-mini-main strong,
.analytics-mini-main small,
.analytics-session-summary-main strong,
.analytics-session-summary-main small {
  display:block;
  overflow-wrap:anywhere;
}
.analytics-mini-main strong,
.analytics-session-summary-main strong {
  font-size:13px;
}
.analytics-mini-main small,
.analytics-session-summary-main small {
  margin-top:2px;
  color:var(--muted);
  font-size:11px;
}
.analytics-mini-kpis,
.analytics-session-summary-kpis {
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-end;
  gap:4px 8px;
  margin-left:auto;
  text-align:right;
  white-space:nowrap;
}
.analytics-mini-kpis b,
.analytics-session-summary-kpis b {
  font-size:11px;
}
.analytics-session-summary-kpis small {
  font-size:10px;
  color:var(--muted);
}
.analytics-mini-body,
.analytics-session-detail {
  border-top:1px solid #e7eef1;
  padding:9px 10px 10px;
}
.analytics-mini-body .combo-kpis {
  margin:0 0 7px;
}
.analytics-session-detail .analytics-weather {
  margin-top:6px;
}
.analytics-session-detail .analytics-session-body {
  margin:7px 0;
}
.analytics-session-detail .analytics-catch-breakdown {
  margin:7px 0;
}
.analytics-session-detail .analytics-finance-line {
  margin-top:7px;
}
.analytics-session-detail > details {
  margin-top:7px;
}

@media (max-width:760px) {
  .analytics-summary-compact {
    grid-template-columns:repeat(4,minmax(0,1fr));
  }
  .analytics-stat-head {
    display:none;
  }
  .analytics-stat-row {
    grid-template-columns:minmax(0,1.5fr) repeat(2,minmax(70px,1fr));
    gap:4px 7px;
  }
  .analytics-stat-row > strong {
    grid-row:span 2;
    align-self:center;
  }
  .analytics-stat-row > span {
    text-align:right;
  }
  .analytics-stat-row > span:nth-of-type(1)::before { content:"記録 "; color:var(--muted); font-size:9px; }
  .analytics-stat-row > span:nth-of-type(2)::before { content:"黒字 "; color:var(--muted); font-size:9px; }
  .analytics-stat-row > span:nth-of-type(3)::before { content:"平均 "; color:var(--muted); font-size:9px; }
  .analytics-stat-row > span:nth-of-type(4)::before { content:"通算 "; color:var(--muted); font-size:9px; }
}
@media (max-width:520px) {
  .analytics-summary-compact {
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
  .analytics-summary-compact strong {
    font-size:16px;
  }
  .analytics-fold > summary {
    gap:7px;
    padding:9px 10px;
  }
  .analytics-fold-meta {
    white-space:normal;
    text-align:right;
  }
  .analytics-fold-body {
    padding:9px 10px 11px;
  }
  .analytics-stat-row {
    grid-template-columns:minmax(0,1fr) minmax(72px,.8fr);
  }
  .analytics-stat-row > strong {
    grid-row:auto;
  }
  .analytics-stat-row > span {
    grid-column:2;
  }
  .analytics-stat-row > span:nth-of-type(1) { grid-row:1; }
  .analytics-mini-details > summary,
  .analytics-session-item > summary {
    align-items:flex-start;
    padding:8px;
  }
  .analytics-mini-kpis,
  .analytics-session-summary-kpis {
    display:grid;
    gap:1px;
  }
}


/* Ver.0.1.97-nas-r6: trip plans, tackle sets and compact replay controls */
.trip-plan-rename-form,
.tackle-set-rename-form,
.analytics-save-set-form {
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap:wrap;
}
.trip-plan-rename-form input,
.tackle-set-rename-form input,
.analytics-save-set-form input {
  min-width:180px;
  width:auto;
  flex:1 1 180px;
  margin-top:0;
}

.tackle-set-panel,
.tackle-set-editor,
.tackle-set-manage-item {
  border:1px solid var(--line);
  border-radius:16px;
  background:#f8fcfe;
  margin:14px 0;
  overflow:hidden;
}
.tackle-set-panel > summary,
.tackle-set-editor > summary,
.tackle-set-manage-item > summary {
  cursor:pointer;
  list-style:none;
  padding:14px 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.tackle-set-panel > summary::-webkit-details-marker,
.tackle-set-editor > summary::-webkit-details-marker,
.tackle-set-manage-item > summary::-webkit-details-marker { display:none; }
.tackle-set-panel > summary span:first-child,
.tackle-set-manage-item > summary span:first-child {
  display:flex;
  flex-direction:column;
  gap:2px;
}
.tackle-set-panel > summary small,
.tackle-set-manage-item > summary small { color:var(--muted); }
.tackle-set-panel-body,
.tackle-set-manage-body,
.tackle-set-editor-form {
  border-top:1px solid var(--line);
  padding:14px 16px 16px;
}
.tackle-set-quick-list,
.tackle-set-manage-list {
  display:grid;
  gap:10px;
}
.tackle-set-quick-item {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  border:1px solid var(--line);
  border-radius:12px;
  background:white;
  padding:11px 12px;
}
.tackle-set-quick-item > div {
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:3px;
}
.tackle-set-quick-item small {
  color:var(--muted);
  overflow-wrap:anywhere;
}
.tackle-set-warning {
  color:var(--danger);
  font-size:13px;
  font-weight:800;
}
.tackle-set-manage-actions {
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
  margin-top:12px;
}
.pretrip-tackle-set-box {
  border:1px solid var(--line);
  border-radius:16px;
  padding:16px;
  margin:16px 0;
  background:#f6fbfe;
}

.analytics-tackle-actions,
.analytics-replay-actions {
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
  margin-top:12px;
}
.analytics-save-set-form {
  flex:1 1 360px;
}
.analytics-tackle-actions form,
.analytics-replay-actions form { margin:0; }

@media (max-width: 680px) {
  .tackle-set-panel > summary,
  .tackle-set-editor > summary,
  .tackle-set-manage-item > summary {
    align-items:flex-start;
    flex-direction:column;
  }
  .tackle-set-quick-item {
    align-items:stretch;
    flex-direction:column;
  }
  .tackle-set-quick-item form,
  .tackle-set-quick-item .button,
  .analytics-tackle-actions form,
  .analytics-tackle-actions .button,
  .analytics-replay-actions form,
  .analytics-replay-actions .button {
    width:100%;
  }
  .trip-plan-rename-form,
  .tackle-set-rename-form,
  .analytics-save-set-form {
    width:100%;
  }
}


/* Ver.0.1.97-nas-r7: normal-trip B/A/S recommendation services */
.recommendation-tier-box {
  grid-template-columns:1fr;
}
.recommendation-tier-grid {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
  width:100%;
}
.recommendation-tier-card {
  display:flex;
  flex-direction:column;
  gap:7px;
  min-width:0;
  padding:12px;
  border:1px solid #d9e6ec;
  border-radius:14px;
  background:#fff;
}
.recommendation-tier-card > strong {
  font-size:18px;
  margin:0;
}
.recommendation-tier-card small {
  color:var(--muted);
  line-height:1.45;
  flex:1;
}
.recommendation-tier-price {
  display:inline-flex;
  align-items:center;
  width:max-content;
  max-width:100%;
  padding:4px 9px;
  border-radius:999px;
  border:1px solid #d7e1e7;
  font-weight:800;
  font-size:13px;
  background:#f7fafc;
}
.recommendation-tier-price.free {
  background:#eefaf1;
  border-color:#cce7d2;
}
.recommendation-tier-card.premium {
  border-width:2px;
}
.recommendation-tier-card .button {
  width:100%;
}
.recommendation-tier-box .recommended-action-row {
  justify-content:flex-start;
}
@media (max-width:760px) {
  .recommendation-tier-grid {
    grid-template-columns:1fr;
  }
  .recommendation-tier-card {
    padding:10px;
  }
}


/* Ver.0.1.97-nas-r8: profile fish selection through the fish book */
.fishbook-search{
  grid-template-columns:auto minmax(180px,1fr) auto minmax(150px,.55fr) auto;
}
.fishbook-sort-label{
  font-weight:800;
  font-size:13px;
}
.fishbook-search select{
  min-width:0;
  width:100%;
}
.fishbook-profile-mode{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  margin:12px 0;
}
.fishbook-profile-mode span{
  flex:1 1 280px;
}
.fishbook-profile-select-form{
  margin:12px 0 0;
}
.fishbook-profile-select-form .button{
  width:100%;
}
.fishbook-profile-choice-form{
  margin:10px 0 0;
}
.profile-fish-picker{
  margin-top:14px;
  padding:12px;
  border:1px solid rgba(0,0,0,.10);
  border-radius:12px;
  background:rgba(0,0,0,.025);
}
.profile-fish-picker>div:first-child{
  display:flex;
  gap:8px 12px;
  align-items:baseline;
  flex-wrap:wrap;
}
.profile-fish-picker>div:first-child span{
  opacity:.78;
}
.profile-title-edit{
  grid-template-columns:minmax(0,1fr) auto;
}
@media (max-width:760px){
  .fishbook-search{
    grid-template-columns:1fr 1fr;
  }
  .fishbook-search label{
    grid-column:auto;
  }
  .fishbook-search input{
    grid-column:1 / -1;
  }
  .fishbook-search #fishbook-search-count{
    justify-self:end;
  }
  .profile-title-edit{
    grid-template-columns:1fr;
  }
}
@media (max-width:480px){
  .fishbook-search{
    grid-template-columns:1fr;
  }
  .fishbook-search input,
  .fishbook-search label,
  .fishbook-search #fishbook-search-count{
    grid-column:1;
  }
  .fishbook-search #fishbook-search-count{
    justify-self:start;
  }
}


/* Ver.0.1.97-nas-r9: compact searchable catch album */
.catch-album-heading{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:16px;
}
.catch-album-total{
  display:flex;
  align-items:baseline;
  gap:4px;
  white-space:nowrap;
}
.catch-album-total strong{
  font-size:32px;
  line-height:1;
}
.catch-album-total span{
  color:var(--muted);
  font-weight:800;
}
.catch-album-filter-card{
  padding-top:12px;
  padding-bottom:12px;
}
.catch-album-filter-panel{
  border:1px solid var(--line);
  border-radius:14px;
  overflow:hidden;
  background:#fbfdfe;
}
.catch-album-filter-panel>summary{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  padding:12px 14px;
  list-style:none;
  cursor:pointer;
  font-weight:900;
}
.catch-album-filter-panel>summary::-webkit-details-marker{display:none}
.catch-album-filter-panel>summary small{
  color:var(--muted);
  font-weight:700;
}
.catch-album-search-form{
  display:grid;
  grid-template-columns:minmax(220px,1.5fr) minmax(170px,.8fr) minmax(140px,.6fr);
  gap:10px;
  padding:14px;
  border-top:1px solid var(--line);
}
.catch-album-search-form label{
  display:grid;
  gap:6px;
  font-weight:800;
  font-size:13px;
}
.catch-album-search-form input,
.catch-album-search-form select{
  width:100%;
  min-width:0;
  min-height:44px;
}
.catch-album-search-actions{
  grid-column:1 / -1;
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.catch-album-list-card{
  padding:0;
  overflow:hidden;
}
.catch-album-list-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  padding:16px 18px;
  border-bottom:1px solid var(--line);
}
.catch-album-list-head h2{
  margin:0;
}
.catch-album-list-head span{
  color:var(--muted);
  font-size:13px;
  font-weight:800;
  white-space:nowrap;
}
.catch-album-list{
  display:grid;
}
.catch-album-item{
  border-bottom:1px solid var(--line);
}
.catch-album-item:last-child{
  border-bottom:0;
}
.catch-album-summary{
  display:grid;
  grid-template-columns:64px minmax(0,1fr) auto;
  gap:12px;
  align-items:center;
  padding:10px 14px;
  list-style:none;
  cursor:pointer;
}
.catch-album-summary::-webkit-details-marker{display:none}
.catch-album-summary:hover{
  background:rgba(80,150,190,.06);
}
.catch-album-item[open]>.catch-album-summary{
  background:rgba(80,150,190,.08);
  border-bottom:1px solid var(--line);
}
.catch-album-thumb{
  width:64px;
  height:64px;
  object-fit:contain;
  border-radius:10px;
  background:#f6fafc;
}
.catch-album-summary-main{
  min-width:0;
  display:grid;
  gap:3px;
}
.catch-album-fish-line{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.catch-album-fish-line strong{
  overflow-wrap:anywhere;
}
.catch-album-kind{
  display:inline-flex;
  align-items:center;
  width:max-content;
  padding:3px 7px;
  border-radius:999px;
  font-size:11px;
  font-weight:900;
  border:1px solid var(--line);
}
.catch-album-kind.target{
  background:#eef8f2;
}
.catch-album-kind.bycatch{
  background:#f5f7f8;
}
.catch-album-size-line{
  font-size:14px;
  font-weight:800;
}
.catch-album-summary-main small{
  color:var(--muted);
  overflow-wrap:anywhere;
}
.catch-album-summary-value{
  min-width:92px;
  display:grid;
  gap:3px;
  text-align:right;
}
.catch-album-summary-value strong{
  white-space:nowrap;
}
.catch-album-summary-value small{
  color:var(--muted);
  font-size:11px;
}
.catch-album-expanded{
  display:grid;
  grid-template-columns:minmax(220px,.8fr) minmax(0,1.2fr);
  gap:18px;
  padding:18px;
  background:#fbfdfe;
}
.catch-album-image-panel{
  display:grid;
  place-items:center;
  min-width:0;
}
.catch-album-image-panel img{
  width:100%;
  max-width:420px;
  max-height:420px;
  object-fit:contain;
  border-radius:14px;
  background:#f5fafc;
}
.catch-album-detail-panel{
  min-width:0;
}
.catch-album-detail-panel h3{
  margin-top:0;
}
.catch-album-detail-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px 12px;
  margin:12px 0 16px;
}
.catch-album-detail-grid>div{
  padding:9px 10px;
  border:1px solid var(--line);
  border-radius:10px;
  background:#fff;
}
.catch-album-detail-grid dt{
  color:var(--muted);
  font-size:11px;
  font-weight:800;
}
.catch-album-detail-grid dd{
  margin:2px 0 0;
  font-weight:900;
  overflow-wrap:anywhere;
}
.catch-album-download-actions{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
}
.catch-album-download-actions .button{
  width:100%;
  text-align:center;
}
.catch-album-download-actions .text-link{
  grid-column:1 / -1;
}
.catch-album-pagination{
  display:grid;
  grid-template-columns:1fr auto 1fr;
  align-items:center;
  gap:12px;
}
.catch-album-pagination>*:last-child{
  justify-self:end;
}
@media (max-width:760px){
  .catch-album-heading{
    align-items:flex-start;
  }
  .catch-album-search-form{
    grid-template-columns:1fr;
  }
  .catch-album-search-actions{
    grid-column:1;
  }
  .catch-album-expanded{
    grid-template-columns:1fr;
  }
}
@media (max-width:560px){
  .catch-album-heading{
    flex-direction:column;
  }
  .catch-album-total strong{
    font-size:26px;
  }
  .catch-album-summary{
    grid-template-columns:52px minmax(0,1fr);
    gap:9px;
    padding:9px 10px;
  }
  .catch-album-thumb{
    width:52px;
    height:52px;
  }
  .catch-album-summary-value{
    grid-column:2;
    grid-row:2;
    display:flex;
    justify-content:space-between;
    align-items:center;
    min-width:0;
    text-align:left;
  }
  .catch-album-summary-value small{
    margin-left:auto;
  }
  .catch-album-expanded{
    padding:12px;
  }
  .catch-album-detail-grid{
    grid-template-columns:1fr;
  }
  .catch-album-download-actions{
    grid-template-columns:1fr;
  }
  .catch-album-download-actions .text-link{
    grid-column:1;
  }
  .catch-album-pagination{
    grid-template-columns:1fr auto 1fr;
    padding-left:10px;
    padding-right:10px;
  }
}

/* r13: keep save/update confirmations inside the current viewport even when
   the page restores a previous scroll position after POST/redirect. */
.save-feedback-toast {
  position:fixed;
  top:calc(env(safe-area-inset-top, 0px) + 72px);
  left:50%;
  transform:translateX(-50%);
  width:min(620px, calc(100vw - 24px));
  margin:0;
  z-index:9999;
  box-shadow:0 10px 28px rgba(0,0,0,.20);
  pointer-events:none;
  animation:kma-save-feedback-toast 5.8s ease forwards;
}
@keyframes kma-save-feedback-toast {
  0%, 82% { opacity:1; transform:translateX(-50%) translateY(0); visibility:visible; }
  100% { opacity:0; transform:translateX(-50%) translateY(-8px); visibility:hidden; }
}
@media (max-width:700px) {
  .save-feedback-toast {
    top:calc(env(safe-area-inset-top, 0px) + 60px);
    width:calc(100vw - 16px);
  }
}

/* Ver.0.2.0-nas-r1: simplified player common navigation.
   Player routes are grouped into Home / Fish / Records / Rankings / Menu.
   Admin navigation is intentionally unchanged for the later admin-UI phase. */
.player-main-nav {
  display:flex;
  align-items:center;
  gap:8px;
  overflow:visible;
  white-space:normal;
  padding:8px max(14px, env(safe-area-inset-left)) 8px max(14px, env(safe-area-inset-right));
  position:relative;
  z-index:45;
}
.player-nav-item,
.player-nav-menu > summary {
  min-height:44px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  padding:8px 12px;
  border-radius:12px;
  color:#fff;
  text-decoration:none;
  line-height:1.2;
  cursor:pointer;
  list-style:none;
  user-select:none;
}
.player-nav-menu > summary::-webkit-details-marker { display:none; }
.player-nav-item:hover,
.player-nav-item:focus-visible,
.player-nav-menu > summary:hover,
.player-nav-menu > summary:focus-visible,
.player-nav-item.is-active,
.player-nav-menu.is-active > summary,
.player-nav-menu[open] > summary {
  background:rgba(255,255,255,.16);
  outline:none;
}
.player-nav-item--primary {
  background:var(--accent);
  border:1px solid rgba(255,255,255,.28);
  color:#382100 !important;
  font-weight:900;
}
.player-nav-item--primary:hover,
.player-nav-item--primary:focus-visible,
.player-nav-item--primary.is-active {
  background:#ffc96f;
}
.player-nav-icon {
  flex:0 0 auto;
  font-size:1.05em;
}
.player-nav-menu {
  position:relative;
  min-width:0;
}
.player-nav-menu-panel {
  position:absolute;
  left:0;
  top:calc(100% + 8px);
  z-index:80;
  width:max-content;
  min-width:240px;
  max-width:min(340px, calc(100vw - 20px));
  max-height:calc(100vh - 130px);
  overflow:auto;
  padding:8px;
  border:1px solid #cddce5;
  border-radius:14px;
  background:#fff;
  color:var(--ink);
  box-shadow:0 14px 34px rgba(5,38,58,.22);
}
.player-nav-menu--more .player-nav-menu-panel {
  left:auto;
  right:0;
}
.player-nav-menu-panel > a {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  width:100%;
  min-height:46px;
  padding:10px 12px;
  border-radius:10px;
  color:var(--ink);
  text-decoration:none;
  white-space:normal;
}
.player-nav-menu-panel > a:hover,
.player-nav-menu-panel > a:focus-visible {
  background:#eef7fb;
  outline:none;
}
.player-nav-menu-meta {
  margin-left:auto;
  color:var(--muted);
  font-size:.9em;
  font-weight:800;
  white-space:nowrap;
}
.player-nav-account-form {
  margin:6px 0 0;
  padding-top:8px;
  border-top:1px solid var(--line);
}
.player-nav-account-button {
  width:100%;
  min-height:46px;
  padding:10px 12px;
  border:0;
  border-radius:10px;
  background:#f5f9fb;
  color:#355569;
  justify-content:flex-start;
  font-size:14px;
}
.player-nav-account-button:hover,
.player-nav-account-button:focus-visible {
  background:#e9f3f7;
  outline:none;
}
.public-main-nav {
  overflow:visible;
  flex-wrap:wrap;
}

@media (max-width:700px) {
  .topbar {
    padding:10px max(10px, env(safe-area-inset-left)) 10px max(10px, env(safe-area-inset-right));
  }
  .topbar .brand {
    min-width:0;
    font-size:14px;
  }
  .topbar .version {
    flex:0 0 auto;
    font-size:10px;
  }
  .player-main-nav {
    display:grid;
    grid-template-columns:repeat(5, minmax(0,1fr));
    gap:4px;
    position:sticky;
    top:0;
    z-index:50;
    padding:6px max(6px, env(safe-area-inset-left)) 6px max(6px, env(safe-area-inset-right));
    overflow:visible;
  }
  .player-nav-item,
  .player-nav-menu > summary {
    min-width:0;
    min-height:52px;
    padding:5px 2px;
    flex-direction:column;
    gap:2px;
    border-radius:10px;
    font-size:11px;
    font-weight:800;
    line-height:1.1;
    text-align:center;
    white-space:normal;
  }
  .player-nav-icon {
    font-size:18px;
    line-height:1;
  }
  .player-nav-item--primary {
    border-width:1px;
  }
  .player-nav-menu-panel {
    top:calc(100% + 6px);
    width:min(310px, calc(100vw - 16px));
    min-width:0;
    max-width:calc(100vw - 16px);
    max-height:calc(100vh - 135px);
  }
  .player-nav-menu:not(.player-nav-menu--more) .player-nav-menu-panel {
    left:50%;
    right:auto;
    transform:translateX(-50%);
  }
  .player-nav-menu--more .player-nav-menu-panel {
    right:0;
    left:auto;
    transform:none;
  }
  .player-nav-menu-panel > a {
    min-height:48px;
    font-size:15px;
  }
}



/* Ver.0.2.1-nas-r1: game home focuses on starting a trip.
   Secondary records are kept in the 0.2.0 shared navigation instead of being
   duplicated as a long wall of home-page buttons. */
.game-home-hero-v021 {
  margin-bottom:14px;
}
.game-home-hero-copy {
  min-width:0;
}
.game-home-hero-v021 h1 {
  margin-bottom:.35em;
}
.game-home-hero-v021 .lead {
  margin-bottom:0;
}
.game-home-primary-actions {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
  margin-bottom:14px;
}
.game-home-action-card {
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  gap:16px;
  min-width:0;
  margin-bottom:0;
  padding:20px;
}
.game-home-action-card h2 {
  margin:.2em 0 .45em;
  font-size:1.35rem;
}
.game-home-action-card p {
  margin:.35em 0;
}
.game-home-action-card small {
  display:block;
  color:var(--muted);
  line-height:1.45;
}
.game-home-action-kicker {
  display:inline-block;
  color:#2c7897;
  font-size:11px;
  font-weight:900;
  letter-spacing:.12em;
}
.game-home-last-trip {
  font-weight:800;
  color:#244c64;
}
.game-home-action-card form {
  margin:0;
}
.game-home-stats-v021 {
  margin:14px 0 18px;
}
.game-home-stats-v021 .card {
  margin-bottom:0;
  padding:16px 18px;
  box-shadow:none;
}
.game-home-event-card {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
}
.game-home-event-card h2 {
  margin:.15em 0 .35em;
}
.game-home-event-card p:last-child {
  margin-bottom:0;
}
.game-home-event-card .button {
  flex:0 0 auto;
  white-space:nowrap;
}
.game-home-guide {
  margin:4px 2px 0;
  padding:10px 12px;
  color:var(--muted);
  font-size:14px;
  text-align:center;
}
.game-home-guide p {
  margin:0;
}

@media (max-width:760px) {
  .game-home-primary-actions {
    grid-template-columns:1fr;
    gap:10px;
  }
  .game-home-action-card {
    padding:18px;
  }
  .game-home-event-card {
    align-items:stretch;
    flex-direction:column;
  }
  .game-home-event-card .button {
    width:100%;
  }
  .game-home-guide {
    text-align:left;
  }
}

/* Ver.0.2.2-nas-r1: separate trip-start actions from saved-plan management */
.setup-plan-load-card {
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(280px,.9fr);
  gap:18px;
  align-items:center;
  margin:16px 0 20px;
  padding:16px;
  border:1px solid #b9d7df;
  border-radius:16px;
  background:#f6fbfe;
}
.setup-plan-load-copy {
  min-width:0;
}
.setup-plan-load-copy strong,
.setup-plan-load-copy small {
  display:block;
}
.setup-plan-load-copy strong {
  margin-top:7px;
  font-size:18px;
}
.setup-plan-load-copy small {
  margin-top:5px;
  color:var(--muted);
  line-height:1.55;
}
.setup-mode-chip {
  display:inline-flex;
  align-items:center;
  width:max-content;
  padding:4px 9px;
  border-radius:999px;
  background:#e3f3f8;
  color:#0d5b72;
  font-size:11px;
  font-weight:900;
  letter-spacing:.04em;
}
.setup-mode-chip-new {
  background:#e8f7ed;
  color:#17633a;
}
.setup-plan-select-label {
  min-width:0;
  margin:0;
}
.setup-plan-select-label select {
  width:100%;
}
.setup-plan-select-label small {
  display:block;
  margin-top:6px;
  color:var(--muted);
  line-height:1.45;
}
.setup-play-section-head {
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap:16px;
  margin:22px 0 12px;
  padding-bottom:10px;
  border-bottom:1px solid var(--line);
}
.setup-play-section-head h2 {
  margin:7px 0 0;
}
.setup-play-section-head > small {
  max-width:420px;
  color:var(--muted);
  text-align:right;
  line-height:1.5;
}
.setup-plan-manager {
  margin-top:22px;
  border:1px solid var(--line);
  border-radius:16px;
  background:#fbfcfd;
  overflow:hidden;
}
.setup-plan-manager > summary {
  cursor:pointer;
  list-style:none;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:15px 16px;
}
.setup-plan-manager > summary::-webkit-details-marker {
  display:none;
}
.setup-plan-manager > summary span:first-child {
  display:flex;
  flex-direction:column;
  gap:3px;
}
.setup-plan-manager > summary small {
  color:var(--muted);
  font-weight:500;
}
.setup-plan-manager-count {
  flex:0 0 auto;
  padding:5px 9px;
  border-radius:999px;
  background:#eef5f7;
  color:#355664;
  font-size:12px;
  font-weight:800;
}
.setup-plan-manager-body {
  border-top:1px solid var(--line);
  padding:16px;
}
.setup-save-kind-guide {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
  margin-bottom:16px;
}
.setup-save-kind-guide > div {
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:6px;
  padding:13px 14px;
  border:1px solid var(--line);
  border-radius:14px;
  background:#fff;
}
.setup-save-kind-guide small {
  color:var(--muted);
  line-height:1.5;
}
.setup-save-kind-guide .button {
  margin-top:3px;
}
.setup-plan-manager .favorite-manage {
  margin-top:0;
}
.setup-plan-empty {
  padding:13px 14px;
  border:1px dashed #bed0d7;
  border-radius:12px;
  background:#fff;
  color:var(--muted);
  line-height:1.6;
}

@media(max-width:700px) {
  .setup-plan-load-card,
  .setup-save-kind-guide {
    grid-template-columns:1fr;
  }
  .setup-play-section-head {
    align-items:flex-start;
    flex-direction:column;
  }
  .setup-play-section-head > small {
    max-width:none;
    text-align:left;
  }
  .setup-plan-manager > summary {
    align-items:flex-start;
    flex-direction:column;
  }
  .setup-plan-manager-count {
    align-self:flex-start;
  }
  .setup-plan-manager .favorite-item {
    flex-direction:column;
  }
  .setup-plan-manager .favorite-item-actions,
  .setup-plan-manager .trip-plan-rename-form {
    width:100%;
    align-items:stretch;
  }
  .setup-plan-manager .favorite-item-actions form,
  .setup-plan-manager .favorite-item-actions .button,
  .setup-plan-manager .trip-plan-rename-form input {
    width:100%;
  }
}

/* Ver.0.2.3-nas-r1: tackle screen hierarchy and launch-first workflow */
.tackle-departure-overview {
  margin:16px 0 20px;
  border:1px solid #b7d5df;
  border-radius:18px;
  background:linear-gradient(180deg,#f7fcfe 0%,#ffffff 100%);
  box-shadow:0 8px 24px rgba(7,57,90,.07);
  overflow:hidden;
}
.tackle-overview-head {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  padding:16px 18px 12px;
}
.tackle-overview-head > div:first-child {
  min-width:0;
}
.tackle-overview-kicker {
  display:block;
  margin-bottom:3px;
  color:var(--muted);
  font-size:11px;
  font-weight:900;
  letter-spacing:.08em;
}
.tackle-overview-head strong {
  display:block;
  font-size:20px;
  line-height:1.35;
  overflow-wrap:anywhere;
}
.tackle-overview-badges {
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-end;
  gap:6px;
}
.tackle-overview-badges span {
  padding:6px 9px;
  border:1px solid #d6e5ea;
  border-radius:999px;
  background:#fff;
  color:#355566;
  font-size:11px;
  font-weight:800;
  white-space:nowrap;
}
.tackle-overview-badges .danger {
  border-color:#e4b4b8;
  background:#fff5f5;
  color:#8d2530;
}
.tackle-preset-status {
  display:flex;
  flex-direction:column;
  gap:4px;
}
.tackle-preset-status strong {
  line-height:1.45;
}
.tackle-preset-status small {
  color:#315f3e;
  font-weight:700;
}
.tackle-current-summary {
  padding:14px 18px;
  border-top:1px solid #dfebef;
  border-bottom:1px solid #dfebef;
  background:#fbfdfe;
  scroll-margin-top:88px;
}
.tackle-summary-title {
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:12px;
  margin-bottom:9px;
}
.tackle-summary-title > span {
  font-size:14px;
  font-weight:900;
}
.tackle-summary-title small {
  color:var(--muted);
}
.tackle-editor-grid {
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:8px;
}
.tackle-editor-field {
  min-width:0;
  margin:0;
  padding:9px 10px 10px;
  border:1px solid #d7e5ea;
  border-radius:11px;
  background:#fff;
}
.tackle-editor-field > span {
  display:block;
  margin-bottom:2px;
  color:#365665;
  font-size:11px;
  font-weight:900;
}
.tackle-editor-field select {
  margin-top:4px;
  min-height:46px;
  padding:10px 9px;
  font-size:14px;
  font-weight:750;
}
.tackle-editor-field .locked-gear-note,
.tackle-editor-note {
  display:block;
  margin-top:5px;
  color:var(--muted);
  font-size:10px;
  line-height:1.35;
  font-weight:650;
}
.tackle-editor-lock-note {
  margin:9px 0 0;
  color:#6e5b2a;
  font-size:11px;
  font-weight:750;
  line-height:1.45;
}
.tackle-launch-row {
  display:grid;
  grid-template-columns:minmax(180px,.72fr) minmax(300px,1.28fr);
  align-items:center;
  gap:14px;
  padding:15px 18px 12px;
}
.tackle-launch-finance {
  display:flex;
  flex-direction:column;
  gap:2px;
}
.tackle-launch-finance > span {
  color:var(--muted);
  font-size:11px;
  font-weight:800;
}
.tackle-launch-finance > strong {
  color:#07395a;
  font-size:24px;
  line-height:1.2;
}
.tackle-launch-finance > small {
  color:#486573;
  font-weight:700;
}
.tackle-cost-summary-button {
  width:100%;
  margin:0;
  padding:10px 12px;
  align-items:stretch;
  border:1px solid #d7e5eb;
  border-radius:13px;
  background:#f8fcfe;
  color:inherit;
  font:inherit;
  text-align:left;
  appearance:none;
  cursor:pointer;
  transition:border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.tackle-cost-summary-button:hover {
  border-color:#9fc5d4;
  background:#f2f9fc;
}
.tackle-cost-summary-button:focus-visible {
  outline:3px solid rgba(38,126,166,.22);
  outline-offset:2px;
}
.tackle-cost-summary-button[aria-expanded="true"] {
  border-color:#8fbdcf;
  background:#eef8fc;
}
.tackle-cost-summary-line {
  display:flex !important;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  width:100%;
}
.tackle-cost-summary-hint {
  flex:0 0 auto;
  padding:3px 7px;
  border-radius:999px;
  background:#e5f2f7;
  color:#24556b;
  font-size:10px;
  font-weight:900;
}
.tackle-cost-breakdown {
  margin:0 18px 12px;
}
.tackle-cost-breakdown[hidden] {
  display:none;
}
.tackle-launch-actions {
  display:flex;
  justify-content:flex-end;
  gap:10px;
  align-items:stretch;
}
.tackle-launch-actions .button,
.tackle-launch-actions button {
  margin:0;
}
.tackle-launch-button {
  min-width:230px;
}
.tackle-launch-note {
  margin:0;
  padding:0 18px 15px;
  color:var(--muted);
  font-size:11px;
  line-height:1.55;
}
.tackle-choice-heading {
  display:flex;
  align-items:end;
  justify-content:space-between;
  gap:16px;
  margin:22px 0 10px;
}
.tackle-choice-heading h2 {
  margin:2px 0 0;
}
.tackle-choice-heading p {
  max-width:520px;
  margin:0;
  color:var(--muted);
  font-size:12px;
  line-height:1.5;
  text-align:right;
}
.tackle-mode-panel {
  margin:10px 0;
  border:1px solid #d7e4e9;
  border-radius:15px;
  background:#fff;
  overflow:hidden;
}
.tackle-mode-panel > summary {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:14px 16px;
  cursor:pointer;
  list-style:none;
  background:#f9fcfd;
}
.tackle-mode-panel > summary::-webkit-details-marker {
  display:none;
}
.tackle-mode-panel > summary > span:first-child {
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:3px;
}
.tackle-mode-panel > summary strong {
  font-size:16px;
}
.tackle-mode-panel > summary small {
  color:var(--muted);
  font-size:11px;
  line-height:1.4;
}
.tackle-panel-toggle {
  flex:0 0 auto;
  padding:4px 8px;
  border-radius:999px;
  background:#edf5f8;
  color:#355566;
  font-size:0;
  font-weight:900;
}
.tackle-panel-toggle::before {
  content:"開く";
  font-size:10px;
}
.tackle-mode-panel[open] > summary .tackle-panel-toggle {
  background:#dfeef3;
}
.tackle-mode-panel[open] > summary .tackle-panel-toggle::before {
  content:"閉じる";
}
.tackle-mode-panel-body {
  padding:14px 16px 16px;
  border-top:1px solid #e2ecef;
}
.tackle-recommendation-panel {
  border-color:#b9dce9;
}
.tackle-recommendation-panel > summary {
  background:#f2fbff;
}
.tackle-recommendation-panel .recommended-tackle-box {
  margin:0;
  border:0;
  border-radius:0;
  padding:0;
  background:transparent;
}
.tackle-recommendation-panel .recommended-tackle-box.big-game-recommended {
  background:transparent;
}
.tackle-manual-panel > summary {
  background:#fbfcfd;
}
.tackle-manual-intro {
  margin:0 0 12px;
  color:#486573;
  font-size:12px;
  line-height:1.55;
}
.tackle-manual-panel .grid.two {
  margin-top:10px;
}
.tackle-save-panel > summary {
  background:#fcfbf7;
}
.tackle-save-panel-body .pretrip-tackle-set-box,
.tackle-save-panel-body .pretrip-favorite-box {
  margin:0 0 12px;
}
.tackle-save-panel-body .pretrip-favorite-box:last-child {
  margin-bottom:0;
}
.tackle-detail-panel {
  margin-top:18px;
  border-style:dashed;
}
.tackle-detail-panel > summary {
  background:#fbfbf9;
}
.tackle-detail-panel-body > .notice:first-child {
  margin-top:0;
}
.tackle-detail-intro {
  margin:12px 0;
  padding:12px 14px;
  border:1px solid #d9e6eb;
  border-radius:13px;
  background:#fbfdfe;
}
.tackle-detail-intro strong {
  display:block;
  margin-bottom:5px;
}
.tackle-detail-intro p {
  margin:0;
  color:var(--muted);
  font-size:12px;
  line-height:1.55;
}
.tackle-set-panel {
  margin:10px 0;
}
.tackle-set-panel > summary {
  background:#f8fcfe;
}
.tackle-set-panel > summary > span:last-child {
  padding:4px 8px;
  border-radius:999px;
  background:#edf5f8;
  color:#355566;
  font-size:10px;
  font-weight:900;
}
.tackle-set-panel[open] > summary > span:last-child {
  background:#dfeef3;
}
@media (max-width:900px) {
  .tackle-editor-grid {
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
  .tackle-launch-row {
    grid-template-columns:1fr;
  }
  .tackle-launch-actions {
    justify-content:flex-start;
  }
}
@media (max-width:760px) {
  .tackle-departure-overview {
    margin-top:12px;
    border-radius:15px;
  }
  .tackle-overview-head,
  .tackle-summary-title,
  .tackle-choice-heading {
    align-items:flex-start;
    flex-direction:column;
  }
  .tackle-overview-badges {
    justify-content:flex-start;
  }
  .tackle-overview-head {
    padding:14px 14px 11px;
  }
  .tackle-overview-head strong {
    font-size:18px;
  }
  .tackle-current-summary {
    padding:12px 14px;
  }
  .tackle-editor-grid {
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .tackle-editor-field:last-child {
    grid-column:1 / -1;
  }
  .tackle-launch-row {
    padding:13px 14px 10px;
  }
  .tackle-launch-finance > strong {
    font-size:22px;
  }
  .tackle-launch-actions {
    display:grid;
    grid-template-columns:1fr;
  }
  .tackle-launch-actions .button,
  .tackle-launch-actions button,
  .tackle-launch-button {
    width:100%;
    min-width:0;
  }
  .tackle-launch-note {
    padding:0 14px 13px;
  }
  .tackle-cost-breakdown {
    margin:0 14px 10px;
  }
  .tackle-choice-heading {
    gap:5px;
  }
  .tackle-choice-heading p {
    text-align:left;
  }
  .tackle-mode-panel > summary {
    padding:13px 14px;
  }
  .tackle-mode-panel-body {
    padding:12px 13px 14px;
  }
}
@media (max-width:420px) {
  .tackle-overview-badges span {
    white-space:normal;
  }
  .tackle-current-summary {
    scroll-margin-top:18px;
  }
}

/* Ver.0.2.4-nas-r1: live fishing focus mode */
body.game-focus-mode {
  background:#edf5f8;
}
body.game-focus-mode .topbar,
body.game-focus-mode .player-main-nav,
body.game-focus-mode footer {
  display:none;
}
body.game-focus-mode .container {
  width:min(1120px,100%);
  max-width:none;
  margin:0 auto;
  padding:max(8px, env(safe-area-inset-top))
          max(12px, env(safe-area-inset-right))
          max(16px, env(safe-area-inset-bottom))
          max(12px, env(safe-area-inset-left));
}
.game-focus-root {
  width:100%;
  max-width:1080px;
  margin:0 auto;
}
.game-focus-kicker {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin:0 2px 7px;
  color:#31586c;
}
.game-focus-kicker > span {
  flex:0 0 auto;
  font-size:12px;
  font-weight:950;
  letter-spacing:.06em;
}
.game-focus-kicker > small {
  min-width:0;
  color:#5a7482;
  font-size:11px;
  font-weight:700;
  text-align:right;
  overflow-wrap:anywhere;
}
.game-focus-mode .game-hud {
  top:max(4px, env(safe-area-inset-top));
  margin-bottom:8px;
  box-shadow:0 7px 22px rgba(7,57,90,.15);
}
.game-focus-mode .game-focus-mode .sea-stage {
  height:min(58dvh,520px);
  min-height:330px;
  border-radius:20px;
  box-shadow:0 9px 28px rgba(7,57,90,.12);
}
.game-focus-mode .bite-panel {
  width:min(68%,460px);
}

.game-focus-root.has-mission .sea-stage {
  height:min(50dvh,450px);
}
.game-focus-mode .game-visual-time {
  justify-content:space-between;
  gap:6px 14px;
  margin:6px 2px 0;
  font-size:12px;
}
.game-focus-mode .game-visual-time > span,
.game-focus-mode .game-visual-time > small {
  color:#557180;
}
.game-focus-mode .game-visual-time strong {
  font-size:15px;
}
.game-focus-mode .game-controls {
  grid-template-columns:minmax(0,1fr);
  gap:8px;
  margin-top:10px;
}
.game-focus-mode .hook-button {
  min-height:82px;
  font-size:30px;
}
.game-focus-mode .quit-form {
  justify-self:end;
}
.game-focus-mode .quit-button {
  min-height:42px;
  padding:8px 13px;
  border-color:#cbd9df;
  background:transparent;
  color:#587180;
  font-size:13px;
}
.game-focus-mode .hook-feedback {
  margin-top:9px;
}
.game-focus-mission {
  margin:7px 0 9px;
  padding:8px;
}
.game-focus-mission .mission-live-head {
  margin-bottom:5px;
}
.game-focus-mission .mission-live-row {
  padding:7px 8px;
}
.mission-live-more {
  margin-top:6px;
  border-top:1px dashed #dbc994;
}
.mission-live-more > summary {
  list-style:none;
  cursor:pointer;
  padding:7px 3px 1px;
  color:#72520b;
  font-size:11px;
  font-weight:900;
}
.mission-live-more > summary::-webkit-details-marker {
  display:none;
}
.mission-live-more > summary::after {
  content:" ＋";
}
.mission-live-more[open] > summary::after {
  content:" −";
}
.game-focus-details {
  margin-top:14px;
  border:1px solid #cddde4;
  border-radius:13px;
  background:#f8fbfc;
  overflow:hidden;
}
.game-focus-details > summary {
  list-style:none;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  min-height:44px;
  padding:10px 13px;
  color:#476878;
  font-size:13px;
  font-weight:900;
}
.game-focus-details > summary::-webkit-details-marker {
  display:none;
}
.game-focus-details > summary::after {
  content:"＋";
  display:grid;
  place-items:center;
  width:24px;
  height:24px;
  flex:0 0 auto;
  border-radius:999px;
  background:#e7f1f5;
  color:#315c70;
}
.game-focus-details[open] > summary::after {
  content:"−";
}
.game-focus-details-body {
  padding:0 13px 13px;
  border-top:1px solid #dbe6ea;
}
.game-focus-details .sea-condition-hud {
  margin-top:12px;
}
.game-focus-details .small-note {
  margin:8px 0 0;
  line-height:1.55;
}

@media (max-width:700px) {
  body.game-focus-mode .container {
    padding-top:max(6px, env(safe-area-inset-top));
    padding-left:max(8px, env(safe-area-inset-left));
    padding-right:max(8px, env(safe-area-inset-right));
  }
  .game-focus-kicker {
    align-items:flex-start;
    flex-direction:column;
    gap:2px;
    margin-bottom:5px;
  }
  .game-focus-kicker > small {
    width:100%;
    text-align:left;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
  }
  .game-focus-mode .game-hud {
    gap:4px;
    padding:7px 6px;
    border-radius:13px;
  }
  .game-focus-mode .game-hud div {
    min-width:0;
    padding:2px;
  }
  .game-focus-mode .game-hud span {
    font-size:10px;
  }
  .game-focus-mode .game-hud strong {
    display:inline-block;
    max-width:100%;
    font-size:19px;
    overflow:hidden;
    text-overflow:ellipsis;
    vertical-align:bottom;
    white-space:nowrap;
  }
  .game-focus-mode .game-hud small {
    font-size:10px;
  }
  .game-focus-mode .sea-stage {
    height:min(48dvh,410px);
    min-height:300px;
    border-radius:16px;
  }
  .game-focus-mode .bite-panel {
    left:3%;
    bottom:4%;
    width:78%;
  }
  .game-focus-mode .game-visual-time {
    align-items:flex-start;
    flex-direction:column;
    gap:1px;
    margin-top:5px;
  }
  .game-focus-mode .hook-button {
    min-height:78px;
    font-size:29px;
  }
  .game-focus-mode .quit-form {
    width:auto;
  }
  .game-focus-mode .quit-button {
    min-height:40px;
    padding:7px 11px;
  }
  .game-focus-root.has-mission .sea-stage {
    height:min(40dvh,350px);
    min-height:280px;
  }
  .game-focus-mission .mission-live-head {
    align-items:center;
    flex-direction:row;
    justify-content:space-between;
    gap:8px;
  }
  .game-focus-mission .mission-live-head strong {
    font-size:12px;
    text-align:right;
  }
  .game-focus-mission .mission-live-row {
    grid-template-columns:auto minmax(0,1fr) auto;
  }
  .game-focus-mission .mission-live-row > b {
    grid-column:auto;
    justify-self:end;
  }
}

@media (max-width:420px) {
  .game-focus-mode .sea-stage {
    min-height:285px;
  }
  .game-focus-mode .hook-button {
    min-height:74px;
    font-size:27px;
  }
  .game-focus-mission .mission-live-row {
    grid-template-columns:auto minmax(0,1fr);
  }
  .game-focus-mission .mission-live-row > b {
    grid-column:2;
    justify-self:start;
  }
}


/* 0.2.5-nas-r1: session result action-first reorganization */
#result-top > .stat-row {
  grid-template-columns:repeat(4,minmax(0,1fr));
}
.result-next-panel {
  display:grid;
  grid-template-columns:minmax(0,1.15fr) minmax(280px,.85fr);
  gap:16px;
  align-items:center;
  margin:14px 0 20px;
  padding:16px;
  border:2px solid #b9dce9;
  border-radius:18px;
  background:linear-gradient(180deg,#f5fbfe,#ffffff);
}
.result-next-copy h2,
.result-next-copy p {
  margin:0;
}
.result-next-copy .eyebrow {
  margin-bottom:4px;
}
.result-next-copy p:last-child {
  margin-top:6px;
  color:var(--muted);
  line-height:1.55;
}
.result-next-actions {
  display:grid;
  gap:8px;
}
.result-next-actions form {
  margin:0;
}
.result-next-actions .button {
  width:100%;
  text-align:center;
  justify-content:center;
}
.result-catches-section {
  margin:18px 0;
  padding:14px;
  border:1px solid var(--line);
  border-radius:18px;
  background:#fff;
}
.result-catches-section > h2 {
  margin-top:0;
}
.catch-save-menu {
  margin-top:10px;
}
.catch-save-menu > summary,
.result-document-menu > summary,
.result-detail-block > summary,
.result-save-settings > summary {
  cursor:pointer;
  list-style:none;
  font-weight:900;
  border:1px solid var(--line);
  border-radius:11px;
  padding:9px 11px;
  background:#f8fbfc;
}
.catch-save-menu > summary::-webkit-details-marker,
.result-document-menu > summary::-webkit-details-marker,
.result-detail-block > summary::-webkit-details-marker,
.result-save-settings > summary::-webkit-details-marker {
  display:none;
}
.catch-save-menu > summary::after,
.result-document-menu > summary::after,
.result-detail-block > summary::after,
.result-save-settings > summary::after {
  content:"＋";
  float:right;
  opacity:.65;
}
.catch-save-menu[open] > summary::after,
.result-document-menu[open] > summary::after,
.result-detail-block[open] > summary::after,
.result-save-settings[open] > summary::after {
  content:"−";
}
.catch-save-actions,
.result-document-actions {
  display:flex;
  flex-wrap:wrap;
  gap:7px;
  margin-top:8px;
}
.catch-save-actions .button,
.result-document-actions .button {
  margin:0;
}
.result-document-menu {
  margin-top:12px;
}
.result-detail-block,
.result-save-settings {
  margin:16px 0;
  border:1px solid var(--line);
  border-radius:16px;
  background:#fbfdfe;
  overflow:hidden;
}
.result-detail-block > summary,
.result-save-settings > summary {
  border:0;
  border-radius:0;
  padding:13px 14px;
  background:#f3f8fa;
}
.result-detail-content {
  margin:0 !important;
  border:0 !important;
  border-radius:0 !important;
  background:#fff !important;
}
.result-summary-table {
  overflow-x:auto;
  padding:8px 12px 12px;
}
.result-save-settings {
  padding:0;
}
.result-save-settings > .small-note {
  margin:12px 14px 0;
}
.result-save-settings-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
  padding:0 14px 14px;
}
.result-save-settings-grid .favorite-save-panel {
  margin:12px 0 0;
  background:#fff;
}
.result-save-settings-grid .favorite-save-panel h2 {
  margin-top:0;
}
.result-bottom-actions {
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
  margin-top:20px;
  padding-top:14px;
  border-top:1px solid var(--line);
}
@media (max-width:700px) {
  #result-top > .stat-row {
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .result-next-panel,
  .result-save-settings-grid {
    grid-template-columns:1fr;
  }
  .result-next-panel {
    padding:14px;
  }
  .result-next-actions .button {
    min-height:48px;
  }
  .catch-save-actions,
  .result-document-actions {
    display:grid;
    grid-template-columns:1fr;
  }
  .catch-save-actions .button,
  .result-document-actions .button {
    width:100%;
    text-align:center;
  }
  .result-catches-section {
    padding:10px;
  }
}


/* 0.2.6-nas-r1 ranking entry/category reorganization */
.ranking-category-nav {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px;
  margin:16px 0;
}
.ranking-category-link,
.ranking-scope-link {
  display:flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  min-height:48px;
  padding:9px 10px;
  border:1px solid #cadde5;
  border-radius:13px;
  background:#f8fbfc;
  color:#184d66;
  font-weight:900;
  text-decoration:none;
  text-align:center;
  line-height:1.25;
}
.ranking-category-link.is-active,
.ranking-scope-link.is-active {
  border-color:#0c5b84;
  background:#0c5b84;
  color:#fff;
}
.ranking-scope-tabs {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px;
  margin:12px 0 16px;
}
.ranking-scope-tabs--trip {
  grid-template-columns:repeat(2,minmax(0,1fr));
}
.ranking-scope-tabs--money {
  grid-template-columns:repeat(3,minmax(0,1fr));
}
.ranking-category-intro {
  display:flex;
  flex-direction:column;
  gap:3px;
  margin:14px 0 8px;
  padding:12px 14px;
  border-left:4px solid #0c5b84;
  border-radius:10px;
  background:#f4f9fb;
}
.ranking-category-intro strong {
  font-size:1.08rem;
}
.ranking-category-intro span {
  color:var(--muted);
  font-size:.92rem;
}
.ranking-home-grid--compact {
  grid-template-columns:repeat(2,minmax(0,1fr));
}
.ranking-hub-home-link {
  margin:16px 0 0;
}
#sale-fish-ranking,
#sale-trip-ranking {
  scroll-margin-top:84px;
}

@media (max-width: 620px) {
  .ranking-category-nav {
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:5px;
  }
  .ranking-category-link {
    min-height:50px;
    padding:7px 4px;
    flex-direction:column;
    gap:1px;
    font-size:.82rem;
  }
  .ranking-scope-tabs,
  .ranking-scope-tabs--trip,
  .ranking-scope-tabs--money {
    grid-template-columns:1fr 1fr;
  }
  .ranking-home-grid--compact {
    grid-template-columns:1fr;
  }
}

/* 0.2.7-nas-r1: records hub */
.records-hub {
  display: grid;
  gap: 1.15rem;
}
.records-hub > h1,
.records-hub > p {
  margin-top: 0;
}
.records-hub-section {
  display: grid;
  gap: .65rem;
}
.records-hub-section + .records-hub-section {
  padding-top: .95rem;
  border-top: 1px solid var(--line, #d9e1e6);
}
.records-hub-section-heading {
  display: flex;
  align-items: baseline;
  gap: .6rem 1rem;
  flex-wrap: wrap;
}
.records-hub-section-heading strong {
  font-size: 1.05rem;
}
.records-hub-section-heading span {
  color: var(--muted, #5f6b72);
  font-size: .9rem;
}
.records-home-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .75rem;
}
.records-home-grid--single {
  grid-template-columns: minmax(0, 1fr);
}
.records-home-card {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "icon title"
    "icon desc";
  align-items: center;
  column-gap: .75rem;
  row-gap: .15rem;
  min-height: 88px;
  padding: .85rem .95rem;
  border: 1px solid var(--line, #d9e1e6);
  border-radius: 14px;
  background: var(--card, #fff);
  color: inherit;
  text-decoration: none;
}
.records-home-card:hover,
.records-home-card:focus-visible {
  border-color: currentColor;
  transform: translateY(-1px);
}
.records-home-card--primary {
  border-width: 2px;
}
.records-home-icon {
  grid-area: icon;
  font-size: 1.75rem;
  line-height: 1;
}
.records-home-card strong {
  grid-area: title;
}
.records-home-card > span:last-child {
  grid-area: desc;
  color: var(--muted, #5f6b72);
  font-size: .88rem;
}
.records-hub-home-link {
  margin: .25rem 0 0;
}
.records-context-actions {
  margin-top: .75rem;
}
@media (max-width: 760px) {
  .records-home-grid,
  .records-home-grid--single {
    grid-template-columns: 1fr;
  }
  .records-home-card {
    min-height: 76px;
  }
}
/* Ver.0.2.10-nas-r1: admin navigation and home information architecture */
.admin-main-nav {
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:6px;
  padding:7px max(10px, env(safe-area-inset-right)) 7px max(10px, env(safe-area-inset-left));
  overflow:visible;
  background:#123744;
}
.admin-nav-item {
  min-width:0;
  min-height:48px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  padding:8px 7px;
  border-radius:11px;
  color:#fff;
  text-align:center;
  text-decoration:none;
  font-weight:800;
  line-height:1.15;
}
.admin-nav-item:hover,
.admin-nav-item:focus-visible,
.admin-nav-item.is-active {
  background:rgba(255,255,255,.16);
  outline:none;
}
.admin-nav-icon { font-size:1.05rem; line-height:1; }

.admin-home-intro { scroll-margin-top:74px; }
.admin-category-jump {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
  margin-top:18px;
}
.admin-category-jump a {
  display:grid;
  grid-template-columns:auto 1fr;
  grid-template-areas:"icon title" "icon note";
  column-gap:10px;
  align-items:center;
  min-width:0;
  padding:13px 14px;
  border:1px solid rgba(18,55,68,.14);
  border-radius:14px;
  background:rgba(238,247,250,.7);
  color:inherit;
  text-decoration:none;
}
.admin-category-jump a:hover,
.admin-category-jump a:focus-visible {
  border-color:rgba(18,55,68,.35);
  background:#eef7fa;
  outline:none;
}
.admin-category-jump a > span {
  grid-area:icon;
  font-size:1.65rem;
}
.admin-category-jump strong {
  grid-area:title;
  min-width:0;
}
.admin-category-jump small {
  grid-area:note;
  color:var(--muted);
  font-size:.78rem;
}

.admin-category-section {
  scroll-margin-top:72px;
  margin-top:16px;
}
.admin-category-heading {
  display:flex;
  align-items:flex-start;
  gap:13px;
  margin-bottom:14px;
}
.admin-category-heading h2 { margin:.1rem 0 .25rem; }
.admin-category-heading p:last-child { margin-bottom:0; }
.admin-category-icon { font-size:2rem; line-height:1; padding-top:5px; }

.admin-module-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}
.admin-module-link {
  display:grid;
  grid-template-columns:42px minmax(0,1fr);
  gap:11px;
  align-items:flex-start;
  min-width:0;
  padding:13px;
  border:1px solid rgba(18,55,68,.14);
  border-radius:14px;
  background:#fff;
  color:inherit;
  text-decoration:none;
}
.admin-module-link:hover,
.admin-module-link:focus-visible {
  border-color:rgba(18,55,68,.35);
  box-shadow:0 5px 14px rgba(18,55,68,.08);
  outline:none;
}
.admin-module-link > span { font-size:1.55rem; text-align:center; line-height:1.2; }
.admin-module-link div { min-width:0; display:grid; gap:3px; }
.admin-module-link strong { font-size:1rem; }
.admin-module-link small { color:var(--muted); line-height:1.45; }
.admin-module-link em {
  margin-top:2px;
  color:#315a65;
  font-size:.76rem;
  font-style:normal;
  line-height:1.35;
}
.admin-section-top-link {
  display:inline-block;
  margin-top:12px;
  font-size:.82rem;
  color:var(--muted);
  text-decoration:none;
}
.admin-section-top-link:hover,
.admin-section-top-link:focus-visible { text-decoration:underline; }
.admin-logout-form { margin-top:1rem; }

@media (max-width: 760px) {
  .admin-main-nav {
    position:sticky;
    top:0;
    z-index:15;
    gap:4px;
    padding-top:5px;
    padding-bottom:5px;
  }
  .admin-nav-item {
    min-height:46px;
    padding:6px 3px;
    flex-direction:column;
    gap:3px;
    font-size:.72rem;
  }
  .admin-nav-icon { font-size:1rem; }
  .admin-category-jump { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .admin-module-grid { grid-template-columns:1fr; }
}
@media (max-width: 390px) {
  .admin-nav-item { font-size:.68rem; }
  .admin-category-jump a {
    grid-template-columns:1fr;
    grid-template-areas:"icon" "title" "note";
    text-align:center;
    justify-items:center;
    padding:11px 8px;
  }
  .admin-category-jump a > span { font-size:1.5rem; }
}
.admin-subnav {
  display:grid;
  grid-template-columns:repeat(6,minmax(0,1fr));
  gap:6px;
  margin:14px 0 4px;
}
.admin-subnav a {
  min-width:0;
  padding:9px 7px;
  border:1px solid rgba(18,55,68,.16);
  border-radius:10px;
  background:#f6fafb;
  color:inherit;
  font-size:.82rem;
  font-weight:800;
  line-height:1.25;
  text-align:center;
  text-decoration:none;
}
.admin-subnav a:hover,
.admin-subnav a:focus-visible,
.admin-subnav a.is-active {
  border-color:rgba(18,55,68,.38);
  background:#eaf4f6;
  outline:none;
}
.admin-primary-actions { margin-top:12px; }

@media (max-width: 760px) {
  .admin-subnav { grid-template-columns:repeat(3,minmax(0,1fr)); }
}



/* Ver.0.2.12-nas-r1: iPhone / narrow-screen usability pass
   UI-only. Keeps gameplay, ranking, economy and stored data untouched. */
html {
  -webkit-text-size-adjust:100%;
  text-size-adjust:100%;
  overflow-x:hidden;
}
body {
  overflow-x:hidden;
}
img,
svg,
canvas,
video {
  max-width:100%;
}
pre {
  max-width:100%;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
}
code {
  overflow-wrap:anywhere;
}
button,
.button,
summary,
input,
select,
textarea {
  -webkit-tap-highlight-color:rgba(15,111,159,.18);
}
button,
.button,
summary {
  touch-action:manipulation;
}
.sale-catch-table-wrap,
.profile-table-wrap,
.balance-tier-table-wrap,
.result-summary-table {
  -webkit-overflow-scrolling:touch;
  overscroll-behavior-x:contain;
}
.player-nav-menu-panel {
  max-height:calc(100vh - 130px);
}
@supports (height: 100dvh) {
  .player-nav-menu-panel {
    max-height:calc(100dvh - 130px - env(safe-area-inset-bottom));
  }
}

@media (max-width:760px) {
  .topbar {
    padding-top:max(10px, env(safe-area-inset-top));
    padding-left:max(10px, env(safe-area-inset-left));
    padding-right:max(10px, env(safe-area-inset-right));
  }
  .topbar .brand {
    overflow-wrap:anywhere;
  }
  .player-main-nav,
  .admin-main-nav {
    top:env(safe-area-inset-top);
  }
  .container {
    padding-left:max(10px, env(safe-area-inset-left));
    padding-right:max(10px, env(safe-area-inset-right));
    padding-bottom:max(32px, calc(20px + env(safe-area-inset-bottom)));
  }
  footer {
    padding-left:max(14px, env(safe-area-inset-left));
    padding-right:max(14px, env(safe-area-inset-right));
    padding-bottom:max(18px, calc(12px + env(safe-area-inset-bottom)));
  }

  /* iOS Safari zooms focused form controls when text is below 16px. */
  input,
  select,
  textarea {
    min-width:0;
    max-width:100%;
    font-size:16px;
  }
  textarea {
    width:100%;
  }
  input[type="date"],
  input[type="time"],
  input[type="datetime-local"],
  input[type="number"],
  input[type="file"] {
    min-width:0;
    max-width:100%;
  }

  button,
  .button {
    max-width:100%;
    white-space:normal;
    overflow-wrap:anywhere;
    line-height:1.25;
  }
  details > summary {
    min-height:44px;
  }
  .actions {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:8px;
  }
  .actions > a,
  .actions > button,
  .actions > form {
    min-width:0;
  }
  .actions > .button,
  .actions > button,
  .actions > form > button,
  .actions > form > .button {
    width:100%;
  }
  .admin-heading-actions,
  .analytics-search-actions,
  .result-bottom-actions,
  .records-context-actions {
    gap:8px;
  }
  .admin-heading-actions .button,
  .analytics-search-actions .button,
  .result-bottom-actions .button,
  .records-context-actions .button {
    min-height:44px;
  }

  .card,
  .hero,
  .notice,
  .error {
    max-width:100%;
  }
  .hero > *,
  .admin-heading > *,
  .game-home-event-card > *,
  .condition-preview-head > *,
  .challenge-sub-results-head > * {
    min-width:0;
  }

  .sale-catch-table-wrap,
  .profile-table-wrap,
  .balance-tier-table-wrap,
  .result-summary-table {
    max-width:100%;
    scrollbar-width:thin;
  }

  .admin-subnav a {
    min-height:44px;
    display:flex;
    align-items:center;
    justify-content:center;
  }
  .fish-tier-button {
    min-height:44px;
  }
  .game-focus-mode .quit-button {
    min-height:44px;
  }
  .game-focus-mode .result-pop {
    top:max(10px, env(safe-area-inset-top));
    left:max(10px, env(safe-area-inset-left));
    width:min(310px, calc(100vw - 20px - env(safe-area-inset-left) - env(safe-area-inset-right)));
  }
  .catch-save-menu > summary,
  .result-document-menu > summary,
  .result-detail-block > summary,
  .result-save-settings > summary,
  .game-focus-details > summary,
  .tackle-mode-panel > summary,
  .tackle-set-panel > summary {
    min-height:44px;
  }

  .player-nav-menu-panel {
    left:auto;
    right:0;
    max-width:calc(100vw - 16px - env(safe-area-inset-left) - env(safe-area-inset-right));
  }
  .player-nav-menu:not(.player-nav-menu--more) .player-nav-menu-panel {
    left:50%;
    right:auto;
  }
}

@media (max-width:520px) {
  .container {
    padding-top:12px;
    padding-left:max(8px, env(safe-area-inset-left));
    padding-right:max(8px, env(safe-area-inset-right));
  }
  .card {
    padding:15px;
    margin-bottom:13px;
    border-radius:15px;
  }
  .hero {
    padding:18px 15px;
    border-radius:16px;
    gap:10px;
  }
  h1 {
    font-size:clamp(26px, 8vw, 34px);
  }
  .hero h1 {
    font-size:clamp(27px, 8.5vw, 36px);
  }
  h2 {
    font-size:clamp(20px, 6vw, 26px);
  }
  .lead {
    font-size:16px;
    line-height:1.55;
  }
  .boat {
    font-size:42px;
  }
  .actions {
    grid-template-columns:1fr;
  }
  .actions > .button,
  .actions > button,
  .actions > form,
  .actions > form > button,
  .actions > form > .button {
    width:100%;
  }
  .stat-row {
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .inline-filter {
    max-width:none;
  }
  .admin-heading-actions,
  .analytics-search-actions,
  .result-bottom-actions,
  .records-context-actions {
    display:grid;
    grid-template-columns:1fr;
    align-items:stretch;
  }
  .admin-heading-actions .button,
  .analytics-search-actions .button,
  .result-bottom-actions .button,
  .records-context-actions .button,
  .ranking-hub-home-link .button,
  .records-hub-home-link .button {
    width:100%;
  }
  .setup-play-section-head,
  .condition-preview-head {
    align-items:flex-start;
    flex-direction:column;
  }
  .setup-play-section-head > small,
  .condition-preview-head > span {
    max-width:none;
    text-align:left;
  }
}

@media (max-width:420px) {
  .ranking-category-nav {
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .ranking-category-link {
    min-height:48px;
    flex-direction:row;
    font-size:.88rem;
  }
  .admin-category-jump {
    gap:7px;
  }
  .result-next-panel,
  .result-catches-section {
    border-radius:14px;
  }
  .tackle-current-gear-list {
    gap:6px;
  }
}

@media (max-width:360px) {
  .topbar {
    gap:6px;
  }
  .topbar .brand {
    font-size:13px;
  }
  .topbar .version {
    font-size:9px;
  }
  .player-main-nav,
  .admin-main-nav {
    gap:2px;
    padding-left:max(4px, env(safe-area-inset-left));
    padding-right:max(4px, env(safe-area-inset-right));
  }
  .player-nav-item,
  .player-nav-menu > summary {
    min-height:58px;
    padding-left:1px;
    padding-right:1px;
    font-size:10.5px;
  }
  .admin-nav-item {
    min-height:52px;
    padding-left:1px;
    padding-right:1px;
    font-size:.66rem;
  }
  .card {
    padding:13px;
  }
  .hero {
    padding:16px 13px;
  }
  .game-focus-mode .game-hud strong {
    font-size:17px;
  }
}


/* Short iPhone / landscape-safe live fishing layout.
   Keep the hook control visible even when a big-game mission panel is present. */
@media (max-width:760px) and (max-height:700px) {
  body.game-focus-mode .container {
    padding-top:max(4px, env(safe-area-inset-top));
  }
  .game-focus-kicker {
    display:none;
  }
  .game-focus-mode .game-hud {
    margin-bottom:4px;
    padding:5px 4px;
  }
  .game-focus-mode .game-hud span {
    font-size:9px;
  }
  .game-focus-mode .game-hud strong {
    font-size:17px;
  }
  .game-focus-mission {
    margin:4px 0 5px;
    padding:5px;
  }
  .game-focus-mission .mission-live-head {
    gap:4px;
    margin-bottom:3px;
  }
  .game-focus-mission .mission-live-head span {
    font-size:10px;
  }
  .game-focus-mission .mission-live-head strong {
    font-size:11px;
  }
  .game-focus-mission .mission-live-row {
    gap:5px;
    padding:4px 5px;
  }
  .game-focus-mission .mission-live-row small {
    font-size:9px;
  }
  .game-focus-mission .mission-live-row strong {
    margin-top:0;
    font-size:11px;
  }
  .game-focus-mission .mission-live-row > b {
    font-size:10px;
  }
  .game-focus-mission .mission-live-badge {
    min-width:40px;
    padding:3px 5px;
    font-size:9px;
  }
  .mission-live-more > summary {
    min-height:44px;
    padding-top:5px;
    padding-bottom:2px;
    font-size:10px;
  }
  .game-focus-root.has-mission .sea-stage {
    height:min(34dvh,230px);
    min-height:200px;
  }
  .game-focus-mode .game-visual-time {
    display:none;
  }
  .game-focus-mode .game-controls {
    gap:6px;
    margin-top:6px;
  }
  .game-focus-mode .hook-button {
    min-height:68px;
    font-size:26px;
  }
}


/* iPhone landscape: prioritize the live rod and hook control over decorative height. */
@media (orientation:landscape) and (max-height:480px) {
  body.game-focus-mode .container {
    padding-top:max(4px, env(safe-area-inset-top));
    padding-bottom:max(8px, env(safe-area-inset-bottom));
  }
  .game-focus-kicker,
  .game-focus-mode .game-visual-time {
    display:none;
  }
  .game-focus-mode .game-hud {
    top:max(2px, env(safe-area-inset-top));
    margin-bottom:4px;
    padding:4px 6px;
  }
  .game-focus-mode .game-hud div {
    padding:1px 2px;
  }
  .game-focus-mode .game-hud span {
    font-size:9px;
  }
  .game-focus-mode .game-hud strong {
    font-size:17px;
  }
  .game-focus-mode .game-hud small {
    font-size:9px;
  }
  .game-focus-mission {
    margin:3px 0 4px;
    padding:4px;
  }
  .game-focus-mission .mission-live-head {
    gap:4px;
    margin-bottom:2px;
  }
  .game-focus-mission .mission-live-head span {
    font-size:9px;
  }
  .game-focus-mission .mission-live-head strong {
    font-size:10px;
  }
  .game-focus-mission .mission-live-row {
    gap:4px;
    padding:3px 5px;
  }
  .game-focus-mission .mission-live-row small {
    display:none;
  }
  .game-focus-mission .mission-live-row strong {
    margin-top:0;
    font-size:10px;
  }
  .game-focus-mission .mission-live-row > b {
    font-size:9px;
  }
  .game-focus-mission .mission-live-badge {
    min-width:38px;
    padding:2px 4px;
    font-size:8px;
  }
  .mission-live-more > summary {
    min-height:44px;
    padding:3px;
    font-size:9px;
  }
  .game-focus-mode .sea-stage {
    height:190px;
    min-height:190px;
  }
  .game-focus-root.has-mission .sea-stage {
    height:135px;
    min-height:135px;
  }
  .game-focus-mode .bite-panel {
    padding:6px 8px;
  }
  .game-focus-mode .bite-panel strong {
    font-size:19px;
  }
  .game-focus-mode .bite-panel small {
    margin-top:2px;
    font-size:10px;
  }
  .game-focus-mode .game-controls {
    gap:5px;
    margin-top:5px;
  }
  .game-focus-mode .hook-button {
    min-height:64px;
    font-size:24px;
  }
  .game-focus-mode .quit-button {
    min-height:44px;
  }
}


/* 0.2.13 UI final polish: shared ranking controls */
.ranking-metric-tabs{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin:12px 0;
}
.ranking-view-switch,
.challenge-scope-switch{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  margin:16px 0 10px;
}
.ranking-view-button{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:52px;
  padding:10px 14px;
  border:2px solid #0c5b84;
  border-radius:14px;
  color:#0b4567;
  background:#fff;
  font-weight:900;
  text-decoration:none;
  text-align:center;
}
.ranking-view-button.active{
  background:#0c5b84;
  color:#fff;
}
.balance-ranking-list,
.auction-ranking-list{
  display:grid;
  gap:10px;
}
.balance-ranking-list article,
.auction-ranking-list article{
  display:grid;
  grid-template-columns:54px 1fr auto;
  gap:12px;
  align-items:center;
  padding:12px;
  border:1px solid rgba(127,127,127,.22);
  border-radius:12px;
}
.balance-rank-no,
.auction-rank-no{
  font-size:1.25rem;
  font-weight:900;
  text-align:center;
}
.balance-rank-main,
.auction-rank-main{
  display:grid;
  gap:4px;
  min-width:0;
}
.balance-rank-main small{display:block}
.balance-rank-value,
.auction-rank-value{
  font-weight:900;
  font-size:1.2rem;
  white-space:nowrap;
}
.balance-rank-value.plus{color:#147a4b}
.balance-rank-value.minus{color:#b13a34}

@media(max-width:720px){
  .balance-ranking-list article,
  .auction-ranking-list article{
    grid-template-columns:42px 1fr;
  }
  .balance-rank-value,
  .auction-rank-value{
    grid-column:2;
  }
}
@media(max-width:620px){
  .ranking-view-switch,
  .challenge-scope-switch{
    grid-template-columns:1fr;
  }
}


/* 0.2.13 UI final polish: record output menus and consistent return navigation */
.record-output-menu{
  margin-top:.7rem;
  border:1px solid rgba(12,91,132,.20);
  border-radius:12px;
  background:#f8fbfd;
  overflow:hidden;
}
.record-output-menu > summary{
  cursor:pointer;
  list-style:none;
  min-height:44px;
  display:flex;
  align-items:center;
  padding:.7rem .85rem;
  font-weight:850;
  color:#0b4567;
  user-select:none;
}
.record-output-menu > summary::-webkit-details-marker{display:none}
.record-output-menu > summary::after{
  content:"＋";
  margin-left:auto;
  font-weight:900;
}
.record-output-menu[open] > summary::after{content:"−"}
.record-output-actions{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:.55rem;
  padding:0 .75rem .75rem;
}
.record-output-actions .button{
  width:100%;
  min-width:0;
  white-space:normal;
  text-align:center;
}
.record-output-menu--compact{max-width:560px}
.section-return-nav{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin:18px 0;
}
.section-return-nav .button{min-height:44px}

@media(max-width:520px){
  .record-output-actions{grid-template-columns:1fr}
  .section-return-nav{display:grid;grid-template-columns:1fr}
  .section-return-nav .button{width:100%}
}

/* 0.2.15 — safe previous-screen navigation */
.safe-back-nav {
  display: flex;
  align-items: center;
  margin: 0 0 0.8rem;
}
.safe-back-button {
  min-height: 44px;
  max-width: 100%;
  white-space: normal;
  text-align: left;
}
.game-focus-mode .safe-back-nav {
  display: none !important;
}
@media (max-width: 520px) {
  .safe-back-nav {
    margin-bottom: 0.65rem;
  }
  .safe-back-button {
    width: 100%;
    justify-content: flex-start;
  }
}

/* 0.2.17-nas-r1: ChatGPT cost-reference workflow */
.cost-reference-scope-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.cost-reference-scope {
  display: flex;
  min-height: 92px;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid var(--border, #d8e2e8);
  border-radius: 16px;
  background: var(--surface, #fff);
  color: inherit;
  text-decoration: none;
}

.cost-reference-scope.is-active {
  border-width: 2px;
  box-shadow: 0 0 0 2px rgba(25, 102, 140, 0.08);
}

.cost-reference-scope span {
  font-size: 0.88rem;
  color: var(--muted, #61768a);
  line-height: 1.45;
}

.cost-reference-summary {
  margin: 14px 0;
}

.cost-reference-table-wrap {
  margin-top: 12px;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.cost-reference-prompt {
  width: 100%;
  min-height: 430px;
  box-sizing: border-box;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.9rem;
  line-height: 1.55;
  white-space: pre;
}

.cost-reference-upload-form,
.cost-reference-confirm-form {
  display: grid;
  gap: 12px;
  align-items: end;
}

.cost-reference-upload-form {
  grid-template-columns: minmax(0, 1fr) auto;
}

.cost-reference-upload-form label {
  display: grid;
  gap: 6px;
}

.cost-reference-source-list {
  display: grid;
  gap: 10px;
  padding-left: 22px;
}

@media (max-width: 760px) {
  .cost-reference-scope-grid {
    grid-template-columns: 1fr;
  }

  .cost-reference-scope {
    min-height: 76px;
  }

  .cost-reference-upload-form {
    grid-template-columns: 1fr;
  }

  .cost-reference-upload-form .button,
  .cost-reference-confirm-form .button {
    min-height: 48px;
    width: 100%;
  }

  .cost-reference-prompt {
    min-height: 360px;
    font-size: 16px;
  }
}

/* Ver.0.2.23-nas-r1: read-only moving destination comparison. */
.residence-current-strip {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:14px 16px;
  border:1px solid var(--line);
  border-radius:14px;
  background:#f8fcfe;
}
.residence-current-strip span,
.residence-move-section-head small,
.residence-move-cost-grid span,
.residence-move-route-values span,
.residence-move-transport-summary span {
  color:var(--muted);
}
.residence-move-section-head {
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:14px;
  margin-bottom:16px;
}
.residence-move-section-head h2 {
  margin:.1em 0 0;
}
.residence-move-city-grid {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
}
.residence-move-city {
  display:flex;
  flex-direction:column;
  gap:4px;
  min-height:112px;
  padding:16px;
  border:2px solid var(--line);
  border-radius:14px;
  background:#fff;
  text-decoration:none;
}
.residence-move-city:hover,
.residence-move-city:focus-visible,
.residence-move-city.is-selected {
  border-color:var(--sea);
  background:var(--foam);
}
.residence-move-city span,
.residence-move-city small {
  color:var(--muted);
  font-size:13px;
}
.residence-move-city strong {
  font-size:20px;
}
.residence-move-cost-grid,
.residence-move-transport-summary {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
}
.residence-move-cost-grid article,
.residence-move-transport-summary > div {
  display:flex;
  flex-direction:column;
  gap:5px;
  min-width:0;
  padding:14px;
  border:1px solid var(--line);
  border-radius:14px;
  background:#fbfdfe;
}
.residence-move-cost-grid strong,
.residence-move-transport-summary strong {
  font-size:20px;
}
.residence-move-reference {
  margin-top:14px;
  padding:12px 14px;
  border:1px solid var(--line);
  border-radius:12px;
}
.residence-move-reference summary {
  cursor:pointer;
  font-weight:800;
}
.residence-move-route-list {
  display:grid;
  gap:12px;
  margin-top:16px;
}
.residence-move-route {
  padding:15px;
  border:1px solid var(--line);
  border-radius:14px;
  background:#fff;
}
.residence-move-route-title {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}
.residence-move-route-title div {
  display:flex;
  flex-direction:column;
}
.residence-move-route-title small {
  color:var(--muted);
}
.residence-move-route-values {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}
.residence-move-route-values > div {
  display:flex;
  flex-direction:column;
  gap:3px;
  padding:10px 12px;
  border-radius:10px;
  background:#f8fcfe;
}
.residence-move-route-values em {
  margin-top:4px;
  color:#8c5a18;
  font-size:12px;
  font-style:normal;
  font-weight:700;
}

.residence-move-balance-grid {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
  margin:14px 0;
}
.residence-move-balance-grid > div {
  display:flex;
  flex-direction:column;
  gap:5px;
  min-width:0;
  padding:14px;
  border:1px solid var(--line);
  border-radius:14px;
  background:#fbfdfe;
}
.residence-move-balance-grid span {
  color:var(--muted);
}
.residence-move-balance-grid strong {
  font-size:20px;
}
.residence-move-confirm {
  display:flex;
  align-items:flex-start;
  gap:10px;
  margin:14px 0;
  padding:12px 14px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#fff;
}
.residence-move-confirm input {
  flex:0 0 auto;
  margin-top:3px;
}
.residence-move-history {
  display:grid;
  gap:10px;
}
.residence-move-history article {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:4px 12px;
  padding:12px 14px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#fbfdfe;
}
.residence-move-history small {
  grid-column:1 / -1;
  color:var(--muted);
}
.residence-move-completed {
  margin-bottom:14px;
}

.is-cost-up {
  color:#9a3440;
}
.is-cost-down {
  color:#176b4c;
}

@media (max-width: 720px) {
  .residence-current-strip,
  .residence-move-section-head {
    align-items:flex-start;
    flex-direction:column;
  }
  .residence-move-city-grid {
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .residence-move-cost-grid,
  .residence-move-transport-summary {
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .residence-move-balance-grid {
    grid-template-columns:1fr;
  }
}
@media (max-width: 460px) {
  .residence-move-city-grid,
  .residence-move-cost-grid,
  .residence-move-transport-summary,
  .residence-move-route-values {
    grid-template-columns:1fr;
  }
  .residence-move-route-title {
    align-items:flex-start;
  }
}



/* Ver.0.2.25-nas-r1: rent / parking display foundation (read-only charging state). */
.residence-housing-head {
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:14px;
  margin-bottom:16px;
}
.residence-housing-head h2 {
  margin:.1em 0 0;
}
.residence-housing-head small,
.residence-housing-summary span,
.residence-home-housing span {
  color:var(--muted);
}
.residence-housing-summary {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
}
.residence-housing-summary article {
  display:flex;
  flex-direction:column;
  gap:6px;
  padding:15px;
  border:1px solid var(--line);
  border-radius:14px;
  background:#fbfdfe;
}
.residence-housing-summary strong {
  font-size:20px;
}
.residence-housing-table tr.is-current td {
  font-weight:700;
  background:#f3fbfd;
}
.residence-home-housing {
  display:grid;
  grid-template-columns:auto 1fr auto 1fr;
  gap:8px 12px;
  align-items:baseline;
  margin:12px 0 4px;
  padding:12px 14px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#fbfdfe;
}
@media (max-width:760px) {
  .residence-housing-summary {
    grid-template-columns:1fr;
  }
  .residence-housing-head {
    align-items:flex-start;
    flex-direction:column;
  }
  .residence-home-housing {
    grid-template-columns:auto 1fr;
  }
}


/* Ver.0.2.57-nas-r1: final administrator information architecture.
   UI-only: keep existing server-side OWNER/ADMIN authorization authoritative. */
.admin-session-bar {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px 16px;
  padding:8px max(14px, env(safe-area-inset-right)) 8px max(14px, env(safe-area-inset-left));
  background:#eaf4f6;
  border-bottom:1px solid rgba(18,55,68,.16);
  color:#294d59;
  font-size:.82rem;
}
.admin-session-identity,
.admin-session-actions {
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
  flex-wrap:wrap;
}
.admin-session-actions { justify-content:flex-end; }
.admin-session-label,
.admin-permission-note { color:#5f7881; }
.admin-session-bar a {
  color:#245b70;
  font-weight:850;
}
.admin-role-badge {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:26px;
  padding:3px 9px;
  border-radius:999px;
  font-size:.72rem;
  font-weight:950;
  letter-spacing:.04em;
  border:1px solid rgba(18,55,68,.18);
  background:#edf3f5;
  color:#355662;
}
.admin-role-badge.role-owner {
  background:#fff3cf;
  border-color:#e4c76b;
  color:#765700;
}
.admin-role-badge.role-admin {
  background:#e6f3f8;
  border-color:#acd2e1;
  color:#225d75;
}
.admin-attention-heading {
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
  margin-top:20px;
}
.admin-attention-heading h2 { margin:.08rem 0 .2rem; }
.admin-attention-grid {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:9px;
  margin:10px 0 0;
}
.admin-attention-card {
  display:grid;
  gap:3px;
  min-width:0;
  padding:12px;
  border:1px solid rgba(18,55,68,.14);
  border-radius:13px;
  background:#f8fbfc;
  color:inherit;
  text-decoration:none;
}
.admin-attention-card:hover,
.admin-attention-card:focus-visible {
  border-color:rgba(18,55,68,.38);
  outline:none;
}
.admin-attention-card > span {
  font-size:.78rem;
  font-weight:850;
  color:#47646e;
}
.admin-attention-card > strong {
  font-size:1.65rem;
  line-height:1.05;
}
.admin-attention-card > small {
  color:var(--muted);
  line-height:1.35;
}
.admin-attention-card.needs-attention {
  background:#fff9e8;
  border-color:#e8d28a;
}
.admin-attention-card.is-critical {
  background:#fff1f0;
  border-color:#e7aaa4;
}
.compact-admin-status-error,
.compact-admin-status-note { margin-top:10px; }
.admin-quick-actions {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px;
  margin-top:12px;
}
.admin-quick-actions a {
  min-height:42px;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:8px;
  border-radius:11px;
  background:#f1f7f9;
  border:1px solid rgba(18,55,68,.13);
  color:#234f60;
  text-align:center;
  text-decoration:none;
  font-size:.82rem;
  font-weight:850;
}
.admin-quick-actions a:hover,
.admin-quick-actions a:focus-visible {
  background:#e6f2f5;
  border-color:rgba(18,55,68,.32);
  outline:none;
}
.admin-operations-group + .admin-operations-group {
  margin-top:22px;
  padding-top:18px;
  border-top:1px solid rgba(18,55,68,.13);
}
.admin-operations-group h3 {
  margin:0 0 3px;
}
.admin-module-static {
  background:#f6f8f9;
  color:#64757c;
  box-shadow:none;
}
.admin-module-static:hover {
  border-color:rgba(18,55,68,.14);
  box-shadow:none;
}

@media (max-width:760px) {
  .admin-session-bar {
    align-items:flex-start;
    padding-top:7px;
    padding-bottom:7px;
  }
  .admin-session-actions {
    justify-content:flex-start;
  }
  .admin-permission-note {
    display:none;
  }
  .admin-attention-grid {
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .admin-quick-actions {
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .admin-attention-card,
  .admin-quick-actions a {
    min-height:54px;
  }
}
@media (max-width:430px) {
  .admin-session-bar {
    flex-direction:column;
    gap:5px;
  }
  .admin-session-actions {
    width:100%;
  }
  .admin-attention-card {
    padding:10px;
  }
}


/* Ver.0.2.58-nas-r1: player onboarding and first-use clarity.
   UI-only; authentication, game results and account lifecycle remain server-authoritative. */
.onboarding-shell { position:relative; }
.onboarding-progress {
  display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:7px; margin:0 0 20px;
}
.onboarding-progress span {
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px;
  min-width:0; min-height:58px; padding:7px 4px; border:1px solid var(--line);
  border-radius:12px; background:#f7fafb; color:#667b87; text-align:center;
  font-size:12px; font-weight:800; line-height:1.2;
}
.onboarding-progress b {
  display:grid; place-items:center; min-width:23px; height:23px; padding:0 4px;
  border-radius:999px; background:#e4ecef; color:#45606d; font-size:12px;
}
.onboarding-progress .is-current { border-color:#76bfd8; background:#edf9fd; color:#0b5675; }
.onboarding-progress .is-current b { background:#0b6f9f; color:#fff; }
.onboarding-progress .is-done { background:#f0f8f2; color:#37624a; }
.onboarding-progress .is-done b { background:#dcefe2; color:#27633e; }

.password-inline { display:flex; gap:.5rem; align-items:stretch; }
.password-inline input { flex:1; min-width:0; }
.password-inline .password-toggle { flex:0 0 auto; min-width:72px; white-space:nowrap; }
.user-auth-form { margin-top:14px; }
.user-back-link {
  display:block; margin-top:16px; text-align:center; color:#35637a; font-weight:800;
}
.account-id-box {
  display:grid; gap:6px; padding:16px; margin:14px 0; text-align:center;
  border:2px solid rgba(13,127,179,.3); border-radius:14px;
  background:rgba(13,127,179,.06); overflow-wrap:anywhere;
}
.account-id-box span { color:var(--muted); font-size:13px; font-weight:800; }
.account-id-box code { font-size:1.28rem; font-weight:900; letter-spacing:.03em; }
.player-name-review strong { font-size:1.35rem; }
.onboarding-important { line-height:1.6; }
.onboarding-divider { margin:24px 0; border:0; border-top:1px solid var(--line); }
.onboarding-confirm-actions { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.onboarding-confirm-actions form { margin:0; }
.onboarding-next-note { font-weight:750; }

.onboarding-mini-steps {
  display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:7px;
  margin:16px 0 18px; padding:0; list-style:none;
}
.onboarding-mini-steps li {
  display:flex; flex-direction:column; align-items:center; gap:5px; min-width:0;
  padding:9px 4px; border:1px solid var(--line); border-radius:11px; background:#fbfdfe;
  text-align:center; font-size:12px; font-weight:800;
}
.onboarding-mini-steps span {
  display:grid; place-items:center; width:24px; height:24px; border-radius:999px;
  background:#e2f1f7; color:#155b78; font-size:12px;
}
.user-help-links { display:flex; flex-wrap:wrap; gap:8px 16px; margin-top:14px; font-size:14px; font-weight:800; }
.user-help-links a { color:#245f7b; }
.user-entry-help-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:9px; }
.user-entry-help-grid .button { text-align:center; }
.user-entry-legacy details > summary { min-height:48px; display:flex; align-items:center; cursor:pointer; }

.first-trip-guide h2 { margin:.15em 0 .65em; }
.first-trip-steps {
  display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin:14px 0 18px;
}
.first-trip-steps > div {
  display:flex; align-items:flex-start; gap:10px; min-width:0; padding:12px;
  border:1px solid var(--line); border-radius:13px; background:#fbfdfe;
}
.first-trip-steps b {
  flex:0 0 auto; display:grid; place-items:center; min-width:30px; height:30px;
  padding:0 5px; border-radius:999px; background:#e3f3f8; color:#0d5b72;
}
.first-trip-steps span, .first-trip-steps small { display:block; }
.first-trip-steps small { margin-top:3px; color:var(--muted); line-height:1.4; }

.first-trip-inline-guide {
  display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:7px; margin:12px 0 18px;
}
.first-trip-inline-guide span {
  min-width:0; padding:9px 10px; border:1px solid var(--line); border-radius:11px;
  background:#f8fafb; color:#627783; text-align:center; font-size:13px; font-weight:800;
}
.first-trip-inline-guide .is-current { border-color:#76bfd8; background:#edf9fd; color:#0b5675; }
.first-trip-inline-guide .is-done { background:#f0f8f2; color:#37624a; }

.user-process-steps {
  display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin:14px 0;
}
.user-process-steps span {
  display:flex; align-items:center; gap:8px; min-width:0; padding:10px;
  border:1px solid var(--line); border-radius:11px; background:#f8fafb;
  color:#5d7380; font-size:13px; font-weight:800;
}
.user-process-steps b {
  flex:0 0 auto; display:grid; place-items:center; width:24px; height:24px;
  border-radius:999px; background:#e3edf1; color:#45606d;
}
.user-process-steps .is-current { border-color:#76bfd8; background:#edf9fd; color:#0b5675; }
.user-process-steps .is-current b { background:#0b6f9f; color:#fff; }

.account-hub-grid {
  display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; margin-bottom:18px;
}
.account-hub-card { display:flex; flex-direction:column; margin-bottom:0; }
.account-hub-card h2 { margin:.15em 0 .45em; font-size:1.28rem; }
.account-hub-card .muted { flex:1 1 auto; }
.account-hub-actions { display:grid; gap:8px; margin-top:10px; }
.account-hub-actions .button { width:100%; }
.account-danger-zone { border-color:#e8c7c9; background:#fffafa; }

/* Keep form controls at a Safari-friendly size and preserve large touch targets. */
@media (max-width:700px) {
  input, select, textarea { font-size:16px; }
  button, .button { min-height:48px; }
  .public-main-nav {
    display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:5px;
    padding:6px max(6px, env(safe-area-inset-left)) 6px max(6px, env(safe-area-inset-right));
  }
  .public-main-nav a {
    display:flex; align-items:center; justify-content:center; min-height:44px;
    padding:6px; border-radius:9px; text-align:center; white-space:normal;
  }
  .user-entry-hero .boat { display:none; }
  .onboarding-confirm-actions, .user-entry-help-grid, .first-trip-steps, .account-hub-grid {
    grid-template-columns:1fr;
  }
  .onboarding-progress, .onboarding-mini-steps { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .first-trip-inline-guide, .user-process-steps { grid-template-columns:1fr; }
  .onboarding-progress span { min-height:52px; }
  .password-inline { align-items:stretch; }
  .password-inline .password-toggle { min-width:68px; padding-inline:10px; }
}
@media (max-width:420px) {
  .container {
    padding-left:max(10px, env(safe-area-inset-left));
    padding-right:max(10px, env(safe-area-inset-right));
  }
  .card { padding:16px; }
  .user-help-links { flex-direction:column; gap:7px; }
}


/* Ver.0.2.59-nas-r1: read-only cross-domain data integrity diagnostics. */
.admin-integrity-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:16px 0;}
.admin-integrity-summary-card{min-height:92px;padding:12px;border:1px solid rgba(120,135,155,.28);border-radius:14px;display:flex;flex-direction:column;justify-content:center;gap:3px;}
.admin-integrity-summary-card strong{font-size:1.7rem;line-height:1;}
.admin-integrity-summary-card small{opacity:.8;}
.admin-integrity-summary-card.is-error{border-color:#b33;}
.admin-integrity-summary-card.is-warning{border-color:#b9851b;}
.admin-integrity-summary-card.is-ok{border-color:#378a5c;}
.admin-integrity-actions{display:flex;flex-wrap:wrap;gap:10px;margin:14px 0;}
.admin-integrity-checks{display:grid;gap:10px;}
.admin-integrity-check{border:1px solid rgba(120,135,155,.28);border-radius:14px;padding:14px;}
.admin-integrity-check.status-error{border-left:5px solid #b33;}
.admin-integrity-check.status-warning{border-left:5px solid #b9851b;}
.admin-integrity-check.status-info{border-left:5px solid #4c78a8;}
.admin-integrity-check.status-ok{border-left:5px solid #378a5c;}
.admin-integrity-check-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;}
.admin-integrity-check-head>div{display:flex;flex-direction:column;gap:4px;min-width:0;}
.admin-integrity-check-head code{font-size:.78rem;opacity:.72;overflow-wrap:anywhere;}
.admin-integrity-badge{white-space:nowrap;border-radius:999px;padding:5px 9px;font-weight:700;font-size:.82rem;border:1px solid currentColor;}
.admin-integrity-badge.is-error{color:#a72b2b;}
.admin-integrity-badge.is-warning{color:#946b10;}
.admin-integrity-badge.is-info{color:#365f8b;}
.admin-integrity-badge.is-ok{color:#2f744e;}
.admin-integrity-samples{margin:8px 0 0;padding-left:20px;}
.admin-integrity-samples code{overflow-wrap:anywhere;}
.button.compact{min-height:40px;padding:8px 12px;}
@media (max-width:760px){
  .admin-integrity-summary{grid-template-columns:repeat(2,minmax(0,1fr));}
  .admin-integrity-actions{display:grid;grid-template-columns:1fr;}
  .admin-integrity-actions .button{min-height:48px;width:100%;}
  .admin-integrity-check-head{align-items:flex-start;}
}


/* Ver.0.2.60: read-only balance/economy regression dashboard. */
.balance-regression-actions {
  align-items: stretch;
}
.balance-regression-actions .button {
  min-height: 48px;
}
.balance-regression-advisories {
  display: grid;
  gap: 10px;
}
.balance-regression-source-grid,
.balance-regression-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}
.balance-regression-source-grid article,
.balance-regression-kpi-grid article {
  border: 1px solid var(--border, #d5dde5);
  border-radius: 12px;
  padding: 14px;
  background: var(--panel, #fff);
  display: grid;
  gap: 6px;
  min-width: 0;
}
.balance-regression-source-grid code {
  overflow-wrap: anywhere;
}
.balance-regression-source-grid small {
  overflow-wrap: anywhere;
}
.balance-regression-kpi-grid strong {
  font-size: 1.16rem;
}
@media (max-width: 640px) {
  .balance-regression-source-grid,
  .balance-regression-kpi-grid {
    grid-template-columns: 1fr;
  }
  .balance-regression-actions {
    width: 100%;
  }
  .balance-regression-actions .button {
    width: 100%;
    justify-content: center;
  }
}


/* 0.2.61 security posture review */
.security-review-heading{display:flex;gap:1rem;align-items:flex-start;justify-content:space-between;}
.security-review-overall,.security-review-badge{display:inline-flex;align-items:center;justify-content:center;min-height:30px;padding:.25rem .7rem;border-radius:999px;font-weight:800;white-space:nowrap;border:1px solid rgba(20,50,70,.16);}
.security-review-actions{display:flex;gap:.55rem;flex-wrap:wrap;margin-top:.85rem;}
.security-review-actions .button{min-height:48px;}
.security-review-summary-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.65rem;margin-top:.8rem;}
.security-review-summary{border:1px solid rgba(20,50,70,.14);border-radius:12px;padding:.7rem;text-align:center;}
.security-review-summary strong{display:block;font-size:1.45rem;}
.security-review-summary span{display:block;font-size:.82rem;margin-top:.1rem;}
.security-review-meta{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.55rem .9rem;margin:0;}
.security-review-meta div{border-top:1px solid rgba(20,50,70,.12);padding-top:.55rem;}
.security-review-meta dt{font-size:.8rem;color:#657885;}
.security-review-meta dd{margin:.12rem 0 0;overflow-wrap:anywhere;}
.security-review-list{display:grid;gap:.7rem;}
.security-review-item{border:1px solid rgba(20,50,70,.14);border-left-width:5px;border-radius:12px;padding:.85rem 1rem;background:rgba(250,252,253,.7);}
.security-review-item-head{display:flex;justify-content:space-between;align-items:flex-start;gap:.7rem;}
.security-review-item h3{margin:.05rem 0 .3rem;}
.security-review-item p{margin:.3rem 0 0;}
.security-review-code{display:block;color:#6b7d89;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;overflow-wrap:anywhere;}
.status-critical{border-color:rgba(173,38,38,.42);background:rgba(173,38,38,.07);color:#8e2525;}
.status-warning{border-color:rgba(178,115,0,.42);background:rgba(214,152,24,.08);color:#79510b;}
.status-ok{border-color:rgba(24,126,91,.35);background:rgba(24,126,91,.07);color:#176a4d;}
.status-info{border-color:rgba(56,104,139,.28);background:rgba(56,104,139,.06);color:#365f7a;}
.security-review-item.status-critical,.security-review-item.status-warning,.security-review-item.status-ok,.security-review-item.status-info{color:inherit;}
.warning-note{margin-top:1rem;}
@media(max-width:760px){
  .security-review-heading{display:block;}
  .security-review-overall{margin-top:.7rem;}
  .security-review-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
  .security-review-meta{grid-template-columns:1fr;}
  .security-review-item-head{align-items:center;}
}


/* 0.2.63: ranking fish No./name partial-search picker */
.ranking-fish-picker{
  display:grid;
  gap:9px;
  width:min(100%, 520px);
}
.ranking-fish-query-label,
.ranking-fish-select-label{
  display:grid;
  gap:5px;
  font-weight:800;
}
.ranking-fish-query-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:8px;
  align-items:center;
}
.ranking-fish-query{
  width:100%;
  min-width:0;
}
.ranking-fish-clear{
  white-space:nowrap;
}
.ranking-fish-query-meta{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  color:var(--muted);
  font-size:12px;
  font-weight:600;
}
.ranking-fish-query-meta strong{
  flex:none;
  color:var(--text);
}
.ranking-fish-filter{
  max-width:none;
  align-items:end;
}
@media (max-width:700px){
  .ranking-fish-picker{
    width:100%;
  }
  .ranking-fish-query-row{
    grid-template-columns:minmax(0,1fr) auto;
  }
  .ranking-fish-query-meta{
    align-items:flex-start;
  }
}

/* 0.2.64-kagoya-r1: ranking UX / result-first layout */
.ranking-toolbar-card{
  padding-bottom:14px;
}
.ranking-toolbar-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
}
.ranking-toolbar-head h1{
  margin-bottom:0;
}
.ranking-switcher-details{
  flex:none;
  min-width:160px;
}
.ranking-switcher-details > summary,
.ranking-admin-options > summary,
.ranking-about-card > summary{
  cursor:pointer;
  font-weight:900;
  color:#0c5b84;
}
.ranking-switcher-details[open]{
  flex:1 1 100%;
  width:100%;
}
.ranking-switcher-details[open] > summary{
  margin-bottom:8px;
}
.ranking-quick-controls{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(260px,360px);
  gap:10px;
  align-items:end;
  margin-top:10px;
}
.ranking-quick-controls .ranking-metric-tabs,
.ranking-toolbar-card > .ranking-view-switch{
  margin:0;
}
.ranking-quick-controls .ranking-view-switch{
  margin:0;
}
.ranking-toolbar-card .ranking-view-button{
  min-height:44px;
  padding:8px 12px;
}
.ranking-toolbar-card .ranking-metric-tabs .button{
  min-height:44px;
}
.ranking-fish-filter--compact{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:10px;
  align-items:end;
  margin:12px 0 0;
}
.ranking-fish-filter--compact .ranking-fish-picker{
  width:100%;
  max-width:none;
}
.ranking-fish-selected{
  display:inline-flex;
  align-items:center;
  width:max-content;
  max-width:100%;
  min-height:34px;
  padding:6px 10px;
  border-radius:999px;
  background:#eaf5f9;
  border:1px solid #c8e1eb;
  color:#084f73;
  font-size:.9rem;
  font-weight:900;
}
.ranking-fish-query-meta span{
  line-height:1.35;
}
.ranking-fish-candidates{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  padding:8px;
  border:1px solid #d7e3e8;
  border-radius:12px;
  background:#f8fbfc;
}
.ranking-fish-candidates[hidden]{
  display:none;
}
.ranking-fish-candidate{
  appearance:none;
  border:1px solid #b9d2dd;
  border-radius:999px;
  background:#fff;
  color:#163b4d;
  padding:7px 10px;
  font:inherit;
  font-size:.86rem;
  font-weight:800;
  cursor:pointer;
}
.ranking-fish-candidate:hover,
.ranking-fish-candidate:focus-visible{
  border-color:#0c5b84;
  background:#e9f4f9;
  outline:none;
}
.ranking-fish-candidate-empty,
.ranking-fish-candidate-more{
  margin:0;
  padding:5px 7px;
  color:var(--muted);
  font-size:.84rem;
}
.ranking-fish-submit{
  min-height:46px;
  white-space:nowrap;
}
.ranking-admin-options{
  margin-top:10px;
  font-size:.9rem;
}
.ranking-admin-options .ranking-test-toggle{
  margin-top:8px;
}
.ranking-result-card{
  scroll-margin-top:72px;
}
.ranking-result-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}
.ranking-result-head h2{
  margin-bottom:0;
}
.ranking-current-fish{
  display:inline-flex;
  flex:none;
  align-items:center;
  min-height:34px;
  padding:6px 10px;
  border-radius:999px;
  background:#0c5b84;
  color:#fff;
  font-size:.88rem;
  font-weight:900;
}
.ranking-about-card{
  padding-top:14px;
  padding-bottom:14px;
}
.ranking-about-card[open] > summary{
  margin-bottom:10px;
}
.ranking-about-body p{
  margin:.4rem 0;
}
.ranking-about-body .small-note{
  margin-top:.5rem;
}

@media(max-width:760px){
  .ranking-toolbar-head{
    flex-direction:column;
    gap:8px;
  }
  .ranking-switcher-details{
    width:100%;
    min-width:0;
  }
  .ranking-quick-controls{
    grid-template-columns:1fr;
  }
  .ranking-fish-filter--compact{
    grid-template-columns:1fr;
  }
  .ranking-fish-submit{
    width:100%;
  }
  .ranking-result-head{
    flex-direction:column;
    gap:7px;
  }
}



/* Ver.0.2.65-kagoya-r1: MY BASE / profile hub.
   UI-only presentation. Existing profile preferences and runtime data remain authoritative. */
.my-base-card {
  position:relative;
  overflow:hidden;
  border-color:rgba(33,72,79,.22);
  background:
    radial-gradient(circle at 92% 8%, rgba(204,168,91,.14), transparent 34%),
    linear-gradient(145deg,#f9fcfc 0%,#eef5f4 60%,#f8f3e8 100%);
}
.my-base-card::before {
  content:"";
  position:absolute;
  inset:0 auto 0 0;
  width:5px;
  background:linear-gradient(#244f58,#b38a43);
}
.my-base-head {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin-bottom:14px;
}
.my-base-head h2 { margin:.1rem 0 .3rem; font-size:clamp(1.45rem,3vw,2rem); }
.my-base-address {
  margin:.2rem 0 0;
  color:#48646b;
  font-weight:750;
}
.my-base-open { white-space:nowrap; }
.my-base-showcase {
  display:grid;
  grid-template-columns:minmax(0,1.25fr) minmax(210px,.75fr);
  gap:12px;
}
.my-base-trophy,
.my-base-certificate {
  min-width:0;
  display:grid;
  gap:6px;
  padding:13px;
  border:1px solid rgba(40,72,77,.14);
  border-radius:16px;
  background:rgba(255,255,255,.76);
  color:inherit;
  text-decoration:none;
}
.my-base-trophy:hover,
.my-base-certificate:hover,
.my-base-trophy:focus-visible,
.my-base-certificate:focus-visible {
  border-color:rgba(40,72,77,.38);
  box-shadow:0 7px 20px rgba(30,60,65,.09);
  outline:none;
}
.my-base-label {
  color:#7d6a43;
  font-size:.68rem;
  font-weight:950;
  letter-spacing:.13em;
}
.my-base-trophy {
  grid-template-columns:112px minmax(0,1fr);
  grid-template-rows:auto auto auto;
  align-items:center;
}
.my-base-trophy .my-base-label { grid-column:1/-1; }
.my-base-trophy-frame {
  grid-row:2/4;
  width:112px;
  height:82px;
  padding:7px;
  border:6px solid #6d4d2f;
  border-radius:4px;
  background:#eadbb6;
  box-shadow:inset 0 0 0 2px #c9a365;
}
.my-base-trophy-frame img {
  width:100%;
  height:100%;
  object-fit:contain;
  background:#edf7f8;
}
.my-base-empty-fish {
  height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:2rem;
  background:#edf7f8;
}
.my-base-trophy strong,
.my-base-certificate strong { font-size:1rem; }
.my-base-trophy small,
.my-base-certificate small { color:var(--muted); line-height:1.35; }
.my-base-certificate {
  grid-template-columns:48px minmax(0,1fr);
  grid-template-rows:auto auto auto;
  align-items:center;
}
.my-base-certificate .my-base-label { grid-column:1/-1; }
.my-base-certificate-mark {
  grid-row:2/4;
  display:flex;
  align-items:center;
  justify-content:center;
  width:46px;
  height:56px;
  border:2px solid #c4a970;
  border-radius:5px;
  background:#fff9e8;
  font-size:1.7rem;
  box-shadow:0 3px 8px rgba(83,63,27,.09);
}
.my-base-quick-links {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
  margin-top:12px;
}
.my-base-quick-links a {
  min-height:42px;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:8px 10px;
  border:1px solid rgba(38,74,80,.13);
  border-radius:11px;
  background:rgba(255,255,255,.72);
  color:#244f58;
  text-decoration:none;
  font-weight:850;
}
.my-base-living-details {
  margin-top:12px;
  border-top:1px solid rgba(38,74,80,.11);
}
.my-base-living-details > summary {
  cursor:pointer;
  padding:12px 2px 2px;
  color:#4c676d;
  font-weight:800;
}
.my-base-living-body { padding-top:8px; }

.profile-room-hero {
  overflow:hidden;
  border-color:rgba(39,70,74,.2);
  background:
    radial-gradient(circle at 92% 8%,rgba(206,169,92,.15),transparent 32%),
    linear-gradient(135deg,#f9fcfc,#eef4f3 64%,#f7f0e2);
}
.profile-room-grid {
  display:grid;
  grid-template-columns:minmax(0,1.2fr) minmax(260px,.8fr);
  gap:24px;
  align-items:center;
}
.profile-room-copy { min-width:0; }
.profile-room-address {
  margin:.3rem 0 .65rem;
  color:#48646b;
  font-weight:800;
}
.profile-room-stat-strip { margin:14px 0 0; }
.profile-room-stat-strip > div {
  border:1px solid rgba(40,72,77,.08);
  background:rgba(255,255,255,.62);
}
.profile-hub-nav {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
  margin-top:14px;
}
.profile-hub-link {
  min-width:0;
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  gap:9px;
  align-items:center;
  padding:11px;
  border:1px solid rgba(36,79,88,.15);
  border-radius:13px;
  background:rgba(255,255,255,.72);
  color:inherit;
  text-decoration:none;
}
.profile-hub-link:hover,
.profile-hub-link:focus-visible {
  border-color:rgba(36,79,88,.42);
  box-shadow:0 6px 16px rgba(24,62,68,.09);
  outline:none;
}
.profile-hub-icon { font-size:1.5rem; }
.profile-hub-link span:nth-child(2) {
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:2px;
}
.profile-hub-link strong { font-size:.9rem; color:#244f58; }
.profile-hub-link small { color:var(--muted); font-size:.72rem; line-height:1.3; }
.profile-hub-link b { color:#9a793c; font-size:1.1rem; }
.profile-room-showcase {
  display:grid;
  gap:10px;
  justify-items:center;
}
.profile-room-fish-frame { width:min(100%,350px); }
.profile-room-edit-links {
  width:min(100%,350px);
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:6px 10px;
}
.profile-room-edit-links a,
.profile-section-actions a {
  color:#315f69;
  font-size:.8rem;
  font-weight:800;
  text-decoration:none;
}
.profile-room-edit-links a:hover,
.profile-section-actions a:hover { text-decoration:underline; }
.profile-public-actions { margin-top:14px; }
.profile-room-section-head {
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
  margin:20px 2px 8px;
  padding:0 2px;
}
.profile-room-section-head h2 { margin:.05rem 0; }
.profile-room-section-head > span {
  color:var(--muted);
  font-size:.86rem;
  text-align:right;
}
.profile-section-actions {
  display:flex;
  flex-wrap:wrap;
  gap:8px 14px;
  justify-content:flex-end;
}
.profile-room-section-head--records { margin-top:24px; }

@media (max-width:760px) {
  .my-base-head,
  .profile-room-section-head {
    align-items:stretch;
    flex-direction:column;
  }
  .my-base-open { width:100%; text-align:center; }
  .my-base-showcase,
  .profile-room-grid {
    grid-template-columns:1fr;
  }
  .profile-hub-nav { grid-template-columns:1fr; }
  .profile-room-showcase { order:-1; }
  .profile-room-fish-frame { width:min(100%,330px); }
  .profile-section-actions { justify-content:flex-start; }
}
@media (max-width:480px) {
  .my-base-trophy {
    grid-template-columns:86px minmax(0,1fr);
  }
  .my-base-trophy-frame {
    width:86px;
    height:68px;
    border-width:5px;
  }
  .my-base-showcase { gap:8px; }
  .my-base-quick-links { grid-template-columns:1fr; }
}


/* Ver.0.2.66-kagoya-r1: balance spotlight + MY RANKING foundation. */
.home-balance-spotlight {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  margin-top:12px;
  padding:18px 22px;
  border-color:rgba(157,117,52,.26);
  background:
    radial-gradient(circle at 92% 12%,rgba(215,178,91,.20),transparent 34%),
    linear-gradient(135deg,#173f47,#275f69 62%,#315861);
  color:#fff;
  box-shadow:0 10px 28px rgba(24,62,69,.16);
}
.home-balance-spotlight > div {
  display:grid;
  gap:3px;
}
.home-balance-label {
  color:#e8d5a0;
  font-size:.72rem;
  font-weight:950;
  letter-spacing:.14em;
}
.home-balance-spotlight strong {
  font-size:clamp(2rem,6vw,3.25rem);
  line-height:1;
  letter-spacing:-.04em;
  font-variant-numeric:tabular-nums;
}
.home-balance-spotlight small {
  color:rgba(255,255,255,.78);
  font-weight:750;
}
.home-balance-note {
  max-width:290px;
  color:rgba(255,255,255,.76);
  font-size:.8rem;
  line-height:1.5;
  text-align:right;
}

.profile-balance-hero {
  display:inline-grid;
  gap:2px;
  min-width:min(100%,320px);
  margin-top:10px;
  padding:12px 16px;
  border:1px solid rgba(157,117,52,.22);
  border-radius:14px;
  background:linear-gradient(135deg,rgba(28,76,84,.94),rgba(40,97,107,.92));
  color:#fff;
  box-shadow:0 7px 18px rgba(27,65,71,.12);
}
.profile-balance-hero span {
  color:#ead7a6;
  font-size:.68rem;
  font-weight:950;
  letter-spacing:.13em;
}
.profile-balance-hero strong {
  font-size:clamp(1.65rem,4vw,2.35rem);
  line-height:1.05;
  font-variant-numeric:tabular-nums;
}
.profile-balance-hero small {
  color:rgba(255,255,255,.76);
  font-size:.74rem;
}

.profile-my-ranking {
  margin-top:16px;
  overflow:hidden;
  border-color:rgba(39,70,74,.18);
  background:
    linear-gradient(180deg,rgba(250,252,251,.98),rgba(241,247,246,.98));
}
.profile-my-ranking-head {
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
}
.profile-my-ranking-head h2 { margin:.05rem 0; }
.profile-my-ranking-head > a {
  color:#315f69;
  font-size:.82rem;
  font-weight:850;
  text-decoration:none;
}
.profile-my-ranking-head > a:hover { text-decoration:underline; }
.profile-my-ranking-grid {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:9px;
}
.profile-my-ranking-grid article {
  min-width:0;
  display:grid;
  gap:4px;
  padding:13px;
  border:1px solid rgba(40,72,77,.10);
  border-radius:14px;
  background:#fff;
}
.profile-my-ranking-grid article > span {
  color:#61747a;
  font-size:.76rem;
  font-weight:800;
}
.profile-my-ranking-grid article > strong {
  color:#173f47;
  font-size:1.16rem;
  line-height:1.2;
  font-variant-numeric:tabular-nums;
}
.profile-my-ranking-grid article > b {
  color:#9a793c;
  font-size:.9rem;
}
.profile-my-ranking-grid article > small {
  color:var(--muted);
  font-size:.68rem;
}
.profile-my-ranking-grid article > a {
  margin-top:2px;
  color:#315f69;
  font-size:.74rem;
  font-weight:800;
  text-decoration:none;
}
.profile-my-ranking-grid article > a:hover { text-decoration:underline; }
.profile-my-ranking-profit {
  border-color:rgba(68,120,91,.18) !important;
}
.profile-my-ranking-loss {
  border-color:rgba(145,78,69,.19) !important;
}
.profile-my-ranking-loss > strong {
  color:#8a4139 !important;
}
.profile-my-ranking-note { margin:11px 2px 0; }

@media (max-width:900px) {
  .profile-my-ranking-grid {
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}
@media (max-width:760px) {
  .home-balance-spotlight {
    align-items:flex-start;
    flex-direction:column;
  }
  .home-balance-note {
    max-width:none;
    text-align:left;
  }
  .profile-my-ranking-head {
    align-items:flex-start;
    flex-direction:column;
  }
}
@media (max-width:520px) {
  .profile-my-ranking-grid {
    grid-template-columns:1fr;
  }
  .home-balance-spotlight {
    padding:16px;
  }
}


/* 0.2.67-kagoya-r1: trip profit/loss ranking detail */
.balance-rank-detail-link{
  display:inline-flex;
  align-items:center;
  gap:.35rem;
  margin-top:.35rem;
  font-weight:800;
  text-decoration:none;
}
.trip-balance-detail-head,
.trip-balance-detail-section-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:1rem;
}
.trip-balance-detail-score{
  margin-top:1rem;
  padding:1.15rem 1.25rem;
  border:1px solid var(--border);
  border-radius:18px;
  background:linear-gradient(135deg,rgba(19,126,93,.10),rgba(255,255,255,.03));
  display:grid;
  gap:.25rem;
}
.trip-balance-detail-score.is-loss{
  background:linear-gradient(135deg,rgba(179,59,59,.11),rgba(255,255,255,.03));
}
.trip-balance-detail-score span,
.trip-balance-detail-score small,
.trip-day-status span,
.trip-balance-detail-section-head>span{
  color:var(--muted);
}
.trip-balance-detail-score strong{
  font-size:clamp(1.9rem,5vw,3rem);
  line-height:1.05;
}
.trip-day-status{
  margin-top:.85rem;
  padding:.8rem 1rem;
  border-radius:14px;
  display:flex;
  align-items:center;
  gap:.75rem;
  border:1px solid var(--border);
}
.trip-day-status.is-special{
  background:rgba(205,157,40,.12);
}
.trip-day-status.is-normal{
  background:rgba(80,110,125,.08);
}
.trip-balance-settlement-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:.75rem;
  margin-top:1rem;
}
.trip-balance-settlement-grid--legacy{
  grid-template-columns:minmax(0,1fr);
}
.trip-balance-settlement-grid article{
  padding:1rem;
  border-radius:16px;
  border:1px solid var(--border);
  background:var(--panel-soft);
  display:grid;
  gap:.25rem;
}
.trip-balance-settlement-grid article span,
.trip-cost-breakdown span{
  color:var(--muted);
  font-size:.88rem;
}
.trip-balance-settlement-grid article strong{
  font-size:1.35rem;
}
.trip-balance-settlement-grid .is-loss strong{
  color:var(--danger,#b33b3b);
}
.trip-balance-settlement-grid .is-profit strong{
  color:var(--success,#197a57);
}
.trip-cost-breakdown{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:.65rem;
  margin-top:.9rem;
}
.trip-cost-breakdown>div{
  padding:.75rem .85rem;
  border-radius:12px;
  border:1px solid var(--border);
  display:flex;
  justify-content:space-between;
  gap:.6rem;
}
.trip-balance-catch-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:.8rem;
  margin-top:1rem;
}
.trip-balance-catch-grid article{
  display:flex;
  gap:.8rem;
  align-items:center;
  border:1px solid var(--border);
  border-radius:16px;
  padding:.75rem;
  background:var(--panel-soft);
}
.trip-balance-catch-image{
  width:82px;
  height:62px;
  flex:0 0 82px;
  border-radius:12px;
  overflow:hidden;
  display:grid;
  place-items:center;
  background:rgba(0,0,0,.06);
  font-size:1.7rem;
}
.trip-balance-catch-image img{
  width:100%;
  height:100%;
  object-fit:cover;
}
.trip-balance-catch-body{
  min-width:0;
  display:grid;
  gap:.14rem;
}
.trip-balance-catch-body small,
.trip-balance-catch-body span{
  color:var(--muted);
}
.trip-balance-catch-body strong{
  font-size:1.05rem;
}
@media(max-width:760px){
  .trip-balance-detail-head,
  .trip-balance-detail-section-head{
    display:grid;
  }
  .trip-balance-settlement-grid,
  .trip-cost-breakdown{
    grid-template-columns:1fr;
  }
  .trip-day-status{
    align-items:flex-start;
    flex-direction:column;
    gap:.2rem;
  }
}

/* 0.2.68-kagoya-r1: species MY RANKING on player profile. */
.profile-species-ranking{
  margin-top:16px;
  border-color:rgba(45,82,91,.16);
  background:
    radial-gradient(circle at 95% 5%,rgba(49,95,105,.08),transparent 32%),
    linear-gradient(180deg,rgba(252,253,253,.98),rgba(245,249,249,.98));
}
.profile-species-ranking-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:14px;
}
.profile-species-ranking-head h2{margin:.05rem 0 .35rem}
.profile-species-ranking-head p{margin:0;color:var(--muted)}
.profile-species-count{
  flex:0 0 auto;
  padding:.42rem .72rem;
  border:1px solid rgba(49,95,105,.18);
  border-radius:999px;
  background:#fff;
  color:#315f69;
  font-size:.8rem;
  font-weight:900;
}
.profile-species-podium{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
  margin-top:14px;
}
.profile-species-podium-card{
  position:relative;
  min-width:0;
  display:grid;
  gap:8px;
  padding:14px;
  border:1px solid rgba(44,75,82,.13);
  border-radius:16px;
  background:#fff;
  box-shadow:0 7px 20px rgba(28,61,68,.06);
}
.profile-species-podium-card.is-medal{
  border-color:rgba(175,133,53,.28);
  background:linear-gradient(145deg,#fff,rgba(237,221,181,.18));
}
.profile-species-rank-badge{
  position:absolute;
  top:10px;
  right:10px;
  min-width:34px;
  text-align:center;
  font-weight:950;
}
.profile-species-podium-card>div{
  display:grid;
  gap:2px;
  padding-right:38px;
}
.profile-species-podium-card small{color:var(--muted);font-size:.7rem}
.profile-species-podium-card strong{color:#173f47;font-size:1.12rem}
.profile-species-podium-card span{font-size:.82rem}
.profile-species-podium-card b{color:#9a793c;font-size:1rem}
.profile-species-podium-card>a{
  color:#315f69;
  font-size:.76rem;
  font-weight:850;
  text-decoration:none;
}
.profile-species-podium-card>a:hover{text-decoration:underline}

.profile-species-ranking-details{
  margin-top:14px;
  border-top:1px solid rgba(45,82,91,.12);
  padding-top:10px;
}
.profile-species-ranking-details>summary{
  cursor:pointer;
  color:#234f58;
  font-weight:900;
}
.profile-species-search{
  display:grid;
  gap:7px;
  margin-top:12px;
  padding:12px;
  border:1px solid rgba(49,95,105,.12);
  border-radius:14px;
  background:rgba(255,255,255,.72);
}
.profile-species-search>label{
  font-size:.8rem;
  font-weight:900;
}
.profile-species-search-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:8px;
}
.profile-species-search-row input{
  min-width:0;
  width:100%;
}
.profile-species-search-meta{
  display:flex;
  justify-content:space-between;
  gap:12px;
  color:var(--muted);
  font-size:.72rem;
}
.profile-species-search-meta strong{
  color:#315f69;
  white-space:nowrap;
}
.profile-species-ranking-list{
  display:grid;
  gap:8px;
  margin-top:10px;
}
.profile-species-ranking-row{
  display:grid;
  grid-template-columns:78px minmax(0,1fr) auto;
  align-items:center;
  gap:12px;
  padding:11px 12px;
  border:1px solid rgba(44,75,82,.11);
  border-radius:13px;
  background:#fff;
}
.profile-species-ranking-row[hidden]{display:none!important}
.profile-species-rank-no{
  display:grid;
  gap:1px;
}
.profile-species-rank-no small{
  color:var(--muted);
  font-size:.68rem;
  font-weight:800;
}
.profile-species-rank-no strong{
  color:#9a793c;
  font-size:1.08rem;
}
.profile-species-rank-main{
  min-width:0;
  display:grid;
  gap:2px;
}
.profile-species-rank-main>strong{
  color:#173f47;
  font-size:1rem;
}
.profile-species-rank-main>span{
  font-size:.82rem;
}
.profile-species-rank-main>small{
  color:var(--muted);
  font-size:.69rem;
}
.profile-species-ranking-row>a{
  color:#315f69;
  font-size:.76rem;
  font-weight:850;
  text-decoration:none;
  white-space:nowrap;
}
.profile-species-ranking-row>a:hover{text-decoration:underline}
.profile-species-ranking-note{margin:11px 2px 0}

@media(max-width:820px){
  .profile-species-podium{grid-template-columns:1fr}
}
@media(max-width:640px){
  .profile-species-ranking-head{display:grid}
  .profile-species-count{width:max-content}
  .profile-species-ranking-row{
    grid-template-columns:62px minmax(0,1fr);
  }
  .profile-species-ranking-row>a{
    grid-column:1 / -1;
    justify-self:start;
  }
  .profile-species-search-meta{
    align-items:flex-start;
    flex-direction:column;
    gap:3px;
  }
}
@media(max-width:430px){
  .profile-species-search-row{grid-template-columns:1fr}
  .profile-species-search-row .button{width:100%}
}



/* 0.2.69-kagoya-r1: auction ranking fully separated from trip economy. */
.auction-ranking-view-switch{
  grid-template-columns:repeat(4,minmax(0,1fr));
}
.auction-rank-value.plus{
  color:#147a4b;
}
.auction-rank-value.minus{
  color:#b13a34;
}
.profile-auction-ranking{
  background:
    linear-gradient(180deg,rgba(252,249,242,.98),rgba(248,245,235,.98));
}
.profile-auction-ranking-grid{
  grid-template-columns:repeat(3,minmax(0,1fr));
}
@media (max-width:900px){
  .auction-ranking-view-switch,
  .profile-auction-ranking-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}
@media (max-width:620px){
  .auction-ranking-view-switch{
    grid-template-columns:1fr;
  }
}
@media (max-width:520px){
  .profile-auction-ranking-grid{
    grid-template-columns:1fr;
  }
}


/* Ver.0.2.71-kagoya-r1: completed FISHING ROOM / MY BASE trophy wall. */
.profile-trophy-wall {
  margin-top:10px;
  overflow:hidden;
}
.profile-trophy-wall-head {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  margin-bottom:14px;
}
.profile-trophy-wall-head h2 {
  margin:.05rem 0 .35rem;
}
.profile-trophy-grid {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
}
.profile-trophy-slot {
  min-width:0;
  display:grid;
  gap:9px;
  padding:10px;
  border:1px solid rgba(78,64,43,.18);
  border-radius:14px;
  background:linear-gradient(180deg,#f7f0dc,#efe3c3);
  box-shadow:0 6px 16px rgba(50,42,29,.08);
}
.profile-trophy-slot.is-empty {
  border-style:dashed;
  background:rgba(247,249,248,.8);
  box-shadow:none;
}
.profile-trophy-slot-no {
  color:#826b46;
  font-size:.68rem;
  font-weight:950;
  letter-spacing:.12em;
}
.profile-trophy-image {
  aspect-ratio:4/3;
  overflow:hidden;
  border:7px solid #6b4a2b;
  border-radius:5px;
  background:#eef7f9;
  box-shadow:inset 0 0 0 2px #c39b5d,0 5px 12px rgba(0,0,0,.12);
}
.profile-trophy-image img {
  width:100%;
  height:100%;
  object-fit:contain;
}
.profile-trophy-placeholder,
.profile-trophy-empty {
  min-height:190px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:7px;
  text-align:center;
}
.profile-trophy-placeholder {
  font-size:2.5rem;
}
.profile-trophy-caption {
  display:grid;
  gap:2px;
}
.profile-trophy-caption strong {
  color:#2d4f55;
  font-size:1.02rem;
}
.profile-trophy-caption span {
  font-weight:850;
}
.profile-trophy-caption small {
  color:var(--muted);
  line-height:1.35;
}
.profile-trophy-actions {
  display:flex;
  gap:7px;
  flex-wrap:wrap;
  margin-top:auto;
}
.profile-trophy-actions .button {
  flex:1 1 110px;
  text-align:center;
}
.profile-trophy-empty > span {
  font-size:2.2rem;
  line-height:1;
  color:#8a795b;
}
.profile-trophy-empty small {
  color:var(--muted);
}
.profile-trophy-source-links {
  display:flex;
  flex-wrap:wrap;
  gap:8px 14px;
  margin-top:13px;
  padding-top:11px;
  border-top:1px solid rgba(0,0,0,.08);
}
.profile-trophy-source-links a {
  color:#315f69;
  font-size:.82rem;
  font-weight:850;
  text-decoration:none;
}
.profile-trophy-source-links a:hover {
  text-decoration:underline;
}
.fishbook-profile-quick-link {
  margin-top:10px;
}
.fishbook-profile-quick-link .button {
  width:100%;
  text-align:center;
}
.catch-profile-wall-form {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:8px;
  align-items:end;
  margin:0 0 12px;
  padding:10px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#fff;
}
.catch-profile-wall-form label {
  display:grid;
  gap:5px;
  font-size:12px;
  font-weight:850;
}
.catch-profile-wall-form select {
  width:100%;
  min-height:42px;
}
.catch-profile-wall-form .button {
  min-height:42px;
  white-space:nowrap;
}
@media (max-width:900px) {
  .profile-trophy-grid {
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}
@media (max-width:620px) {
  .profile-trophy-wall-head {
    flex-direction:column;
  }
  .profile-trophy-grid {
    grid-template-columns:1fr;
  }
  .profile-trophy-image {
    max-height:320px;
  }
  .catch-profile-wall-form {
    grid-template-columns:1fr;
  }
}


/* Ver.0.2.72-kagoya-r1 — HOME / PROFILE information hierarchy */
.home-balance-spotlight.home-balance-compact {
  min-height:0;
  display:flex;
  flex-direction:row;
  align-items:center;
  justify-content:flex-start;
  gap:10px;
  padding:9px 14px;
  margin-top:10px;
}
.home-balance-compact .home-balance-label {
  flex:0 0 auto;
  font-size:.64rem;
  letter-spacing:.14em;
}
.home-balance-compact strong {
  font-size:clamp(1.28rem,3.7vw,1.72rem);
  line-height:1.05;
  letter-spacing:-.025em;
}
.home-balance-compact .home-balance-note {
  margin-left:2px;
  color:rgba(255,255,255,.68);
  font-size:.72rem;
  font-weight:750;
}
.home-balance-link {
  margin-left:auto;
  color:#f5e5b9;
  font-size:.72rem;
  font-weight:850;
  text-decoration:none;
  white-space:nowrap;
}
.home-balance-link:hover { text-decoration:underline; }

.profile-balance-hero.profile-balance-compact {
  display:inline-flex;
  align-items:baseline;
  gap:9px;
  min-width:0;
  width:min(100%,360px);
  margin-top:8px;
  padding:7px 11px;
  border-radius:11px;
  text-decoration:none;
}
.profile-balance-compact strong {
  font-size:clamp(1.25rem,3.2vw,1.65rem);
  line-height:1;
}
.profile-balance-compact small {
  margin-left:auto;
  white-space:nowrap;
}
.profile-balance-compact:hover {
  border-color:rgba(234,215,166,.58);
  transform:translateY(-1px);
}

.my-base-address a {
  color:inherit;
  font-weight:inherit;
  text-decoration:none;
}
.my-base-address a:hover { text-decoration:underline; }
.my-base-address a span {
  margin-left:5px;
  color:#8b713f;
  font-size:.72rem;
  font-weight:850;
}

.home-my-ranking {
  margin-top:14px;
  padding-top:13px;
  border-top:1px solid rgba(38,74,80,.11);
}
.home-my-ranking-head {
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
  margin-bottom:9px;
}
.home-my-ranking-head > div {
  display:grid;
  gap:2px;
}
.home-my-ranking-head strong {
  color:#173f47;
  font-size:1rem;
}
.home-my-ranking-head > a {
  color:#315f69;
  font-size:.76rem;
  font-weight:850;
  text-decoration:none;
}
.home-my-ranking-head > a:hover { text-decoration:underline; }
.home-my-ranking-grid {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px;
}
.home-my-ranking-grid article {
  min-width:0;
  display:grid;
  gap:3px;
  padding:10px 11px;
  border:1px solid rgba(40,72,77,.10);
  border-radius:12px;
  background:rgba(255,255,255,.82);
}
.home-my-ranking-grid article > span {
  color:#61747a;
  font-size:.69rem;
  font-weight:800;
}
.home-my-ranking-grid article > strong {
  overflow:hidden;
  color:#173f47;
  font-size:.98rem;
  line-height:1.2;
  font-variant-numeric:tabular-nums;
  text-overflow:ellipsis;
}
.home-my-ranking-grid article > small {
  color:#9a793c;
  font-size:.68rem;
  font-weight:850;
}
.home-my-ranking-grid .home-my-ranking-loss > strong { color:#8a4139; }

@media (max-width:720px) {
  .home-balance-spotlight.home-balance-compact {
    flex-direction:row;
    align-items:center;
    gap:8px;
    padding:8px 11px;
  }
  .home-balance-compact .home-balance-note { display:none; }
  .home-balance-link { font-size:.68rem; }
  .home-my-ranking-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:420px) {
  .home-balance-compact strong { font-size:1.22rem; }
  .home-balance-compact .home-balance-label { font-size:.58rem; }
  .home-balance-link { font-size:.64rem; }
  .home-my-ranking-grid { grid-template-columns:1fr 1fr; }
  .home-my-ranking-grid article { padding:9px; }
}

/* Anti-bot honeypot: keep in DOM but outside the visible page. */
.kma-hp {
    position: absolute !important;
    left: -10000px !important;
    top: auto !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}
