/* ワールド手帳 — ダークテーマ（深緑×チャコール）。グラデーション・過剰な角丸・装飾アニメーションは使わない。 */
:root {
  color-scheme: dark;
  --bg: #121714;
  --surface: #1a211d;
  --surface-2: #212a25;
  --surface-3: #29342e;
  --border: #33403a;
  --border-strong: #4b5c52;
  --text: #e8eee6;
  --muted: #a0aea4;
  --faint: #7d8c82;
  --accent: #8fca6f;
  --accent-hover: #a5d98a;
  --accent-ink: #102010;
  --accent-text: #a9dc8e;
  --warn: #e3b964;
  --warn-bg: #2f2a1c;
  --danger: #ec9686;
  --danger-bg: #3a2420;
  --focus: #f0c86a;
  --overworld: #9fd38a;
  --nether: #ec9a80;
  --end: #c9aaea;
  --radius: 4px;
  --mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", Consolas, monospace;
  font-family: system-ui, -apple-system, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", Meiryo, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); min-height: 100vh; overflow-x: hidden; }
a { color: var(--accent-text); }
a:hover { color: var(--accent-hover); }
h1, h2, h3 { line-height: 1.3; margin: 0; }
h1 { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: 1.1rem; font-weight: 700; }
h3 { font-size: 0.95rem; font-weight: 700; }
p { margin: 0; }
code, .mono { font-family: var(--mono); }
hr { border: 0; border-top: 1px solid var(--border); margin: 18px 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 8px; top: -60px; z-index: 300; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: var(--radius); font-weight: 700; }
.skip-link:focus { top: 8px; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; color: var(--muted); line-height: 1.7; }
.small b { color: var(--text); }
.pad { padding: 12px 14px; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.error-text { color: var(--danger); }
.row { display: flex; gap: 8px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.stack { display: grid; gap: 14px; }
.narrow { max-width: 620px; }
.label { display: block; font-size: 0.78rem; color: var(--muted); font-weight: 600; letter-spacing: 0.04em; }
.req { font-size: 0.72rem; color: var(--warn); font-weight: 600; margin-left: 4px; }

/* ---------------------------------------------------------------- ボタン */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 38px; padding: 7px 14px; border-radius: var(--radius);
  border: 1px solid var(--border-strong); background: var(--surface-3); color: var(--text);
  font-weight: 600; font-size: 0.9rem; text-decoration: none; white-space: nowrap; line-height: 1.2;
}
.btn:hover { background: #33413a; color: var(--text); }
.btn:disabled, .btn[aria-busy="true"] { opacity: 0.55; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.ghost { background: transparent; border-color: var(--border); color: var(--muted); }
.btn.ghost:hover { color: var(--text); border-color: var(--border-strong); }
.btn.danger { background: var(--danger-bg); border-color: #7a4a42; color: #ffd9d0; }
.btn.danger:hover { background: #4a2c26; }
.danger-text { color: var(--danger) !important; }
.btn.small { min-height: 32px; padding: 5px 10px; font-size: 0.82rem; }
.btn.icon { width: 38px; padding: 0; font-size: 1.1rem; }
.btn.block { width: 100%; }
.btn.copy { border-color: #4f6b4a; color: var(--accent-text); background: #1f2c22; }
.btn.copy:hover { background: #26372a; }
.btn.toggle[aria-pressed="true"] { background: var(--warn-bg); border-color: #7a6634; color: var(--warn); }
.link-btn { background: none; border: 0; padding: 2px 0; color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; font-size: 0.85rem; }
.icon-btn { background: none; border: 0; color: var(--muted); font-size: 1.5rem; line-height: 1; width: 40px; height: 40px; border-radius: var(--radius); }
.icon-btn:hover { color: var(--text); background: var(--surface-3); }

.chip { display: inline-flex; align-items: center; border: 1px solid var(--border-strong); color: var(--muted); font-size: 0.75rem; font-weight: 600; padding: 2px 8px; border-radius: 3px; white-space: nowrap; }
.chip.warn { color: var(--warn); border-color: #7a6634; }
.chip.role-owner { color: var(--accent-text); border-color: #4f6b4a; }
.chip.role-editor { color: #b9d3f0; border-color: #4a5f78; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

.seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--radius); overflow: hidden; flex-wrap: wrap; }
.seg button { background: transparent; border: 0; border-right: 1px solid var(--border); color: var(--muted); padding: 7px 12px; min-height: 36px; font-size: 0.85rem; font-weight: 600; }
.seg button:last-child { border-right: 0; }
.seg button:hover { color: var(--text); background: var(--surface-3); }
.seg button[aria-pressed="true"] { background: var(--surface-3); color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); }

/* ---------------------------------------------------------------- 入力 */
.field { display: grid; gap: 5px; min-width: 0; }
.field label, fieldset legend { font-size: 0.82rem; font-weight: 600; color: #cfd9d0; }
.field small { color: var(--faint); font-size: 0.78rem; line-height: 1.5; }
input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea, .select, .search {
  width: 100%; min-width: 0; background: #0f1411; border: 1px solid var(--border-strong); border-radius: var(--radius);
  padding: 8px 10px; min-height: 40px; color: var(--text); font-size: 0.95rem;
}
textarea { resize: vertical; min-height: 72px; line-height: 1.6; }
select, .select { width: auto; max-width: 100%; padding-right: 28px; }
.field select { width: 100%; }
input::placeholder, textarea::placeholder { color: #6c7b71; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
input[aria-invalid="true"] { border-color: var(--danger); }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); width: 18px; height: 18px; margin: 0; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 0.9rem; min-height: 36px; cursor: pointer; }
.inline { display: inline-flex; align-items: center; gap: 6px; font-size: 0.85rem; color: var(--muted); }
.inline .select { min-height: 36px; }
fieldset.plain { border: 0; padding: 0; margin: 0; display: grid; gap: 14px; min-width: 0; }
fieldset.point { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px 12px; margin: 0 0 12px; display: grid; gap: 10px; }
fieldset:disabled input, fieldset:disabled select, fieldset:disabled textarea { opacity: 0.75; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.xyz { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.xyz.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-error { background: var(--danger-bg); border: 1px solid #7a4a42; color: #ffd9d0; padding: 8px 12px; border-radius: var(--radius); font-size: 0.88rem; }
.radios { display: grid; gap: 2px; }

/* ---------------------------------------------------------------- 枠組み */
.shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: #151b17; border-right: 1px solid var(--border); padding: 18px 12px; display: flex; flex-direction: column; gap: 18px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.05rem; color: var(--text); text-decoration: none; letter-spacing: 0.02em; }
.brand:hover { color: var(--text); }
.brand img { display: block; border-radius: 3px; }
.sidebar > .brand { padding: 0 6px; }
.side-nav { display: grid; gap: 2px; }
.side-link, .tab-link { display: flex; align-items: center; gap: 10px; color: var(--muted); text-decoration: none; padding: 9px 10px; border-radius: var(--radius); font-weight: 600; font-size: 0.92rem; }
.side-link:hover { background: var(--surface-2); color: var(--text); }
.side-link.active { background: var(--surface-3); color: var(--text); box-shadow: inset 3px 0 0 var(--accent); }
.nav-icon { width: 20px; text-align: center; font-size: 1.05rem; }
.side-worlds h2 { font-size: 0.75rem; color: var(--faint); letter-spacing: 0.08em; padding: 0 10px 6px; }
.side-worlds ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.side-worlds a { display: flex; justify-content: space-between; gap: 8px; align-items: center; padding: 6px 10px; border-radius: var(--radius); color: var(--muted); text-decoration: none; font-size: 0.88rem; }
.side-worlds a:hover { background: var(--surface-2); color: var(--text); }
.side-worlds a.active { color: var(--text); background: var(--surface-2); box-shadow: inset 3px 0 0 var(--accent); }
.side-worlds .count, .tab .count { font-family: var(--mono); font-size: 0.75rem; color: var(--faint); }
.side-user { margin-top: auto; border-top: 1px solid var(--border); padding: 12px 10px 0; display: flex; gap: 8px; align-items: center; justify-content: space-between; font-size: 0.85rem; color: var(--muted); }
.main-col { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: none; }
main { padding: 28px clamp(16px, 4vw, 48px) 64px; max-width: 1240px; width: 100%; }
main:focus { outline: none; }
.tabbar { display: none; }
.banner { padding: 9px 16px; font-size: 0.88rem; border-bottom: 1px solid var(--border); }
.banner.warn { background: var(--warn-bg); color: #f3dfb0; border-color: #5c4e2b; }

.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.lead { color: var(--muted); margin-top: 4px; }
.toolbar { margin-bottom: 14px; }
.toolbar .search { max-width: 420px; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.panel h2 { margin-bottom: 8px; }
.notice { background: var(--surface-2); border: 1px solid var(--border-strong); border-left: 3px solid var(--accent); padding: 10px 14px; border-radius: var(--radius); font-size: 0.9rem; }
.notice.warn { border-left-color: var(--warn); background: var(--warn-bg); }
.empty { border: 1px dashed var(--border-strong); border-radius: var(--radius); padding: 32px 20px; text-align: center; color: var(--muted); display: grid; gap: 10px; justify-items: center; }
.empty-title { color: var(--text); font-weight: 700; font-size: 1.05rem; }
.state-box { display: grid; justify-items: center; gap: 12px; padding: 60px 20px; color: var(--muted); text-align: center; }
.state-box.error p { color: var(--text); max-width: 520px; }
.spinner { width: 22px; height: 22px; border: 3px solid var(--border-strong); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- マイワールド */
.world-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.world-list li + li { border-top: 1px solid var(--border); }
.world-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 16px; background: var(--surface); color: var(--text); text-decoration: none; }
.world-row:hover { background: var(--surface-2); color: var(--text); }
.world-mark { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--border-strong); background: var(--surface-3); border-radius: 3px; font-weight: 800; font-family: var(--mono); color: var(--accent-text); }
.world-mark.ed-bedrock { color: #b9d3f0; }
.world-main { display: grid; gap: 2px; min-width: 0; }
.world-name { font-weight: 700; font-size: 1.02rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.world-meta, .world-updated { color: var(--muted); font-size: 0.82rem; }

/* ---------------------------------------------------------------- ワールド詳細 */
.crumbs { display: flex; gap: 8px; align-items: center; font-size: 0.88rem; margin-bottom: 10px; color: var(--faint); min-width: 0; }
.world-switch { max-width: min(320px, 60vw); min-height: 32px !important; padding: 3px 26px 3px 8px !important; font-size: 0.88rem !important; background: var(--surface) !important; }
.world-head .page-head { margin-bottom: 12px; }
.world-head h1 { overflow-wrap: anywhere; }
.seed-box { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: var(--radius); margin: 4px 0 12px; }
.seed { display: block; font-size: 1.15rem; font-weight: 600; overflow-wrap: anywhere; color: #eef3d8; }
.world-notes { color: var(--muted); white-space: pre-wrap; margin-bottom: 10px; font-size: 0.92rem; }
.stats { color: var(--muted); font-size: 0.88rem; margin-bottom: 4px; }
.stats b { color: var(--text); font-family: var(--mono); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin: 16px 0 18px; overflow-x: auto; scrollbar-width: none; }
.tab { background: none; border: 0; border-bottom: 3px solid transparent; color: var(--muted); padding: 10px 12px; font-weight: 700; font-size: 0.95rem; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }

.quick-add { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; margin-bottom: 14px; display: grid; gap: 8px; }
.qa-fields { display: grid; grid-template-columns: minmax(140px, 1.1fr) minmax(170px, 1.3fr) minmax(120px, 0.7fr) auto; gap: 10px; align-items: end; }
.qa-fields .btn { min-height: 40px; }
.qa-fields .grow { min-width: 0; }
.task-add .qa-fields { grid-template-columns: minmax(180px, 2fr) minmax(140px, 1fr) auto; }
.qa-hint { font-size: 0.82rem; color: var(--muted); min-height: 1.4em; }
.quick-add .link-btn { justify-self: start; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.filters .search { flex: 1 1 220px; max-width: 360px; }
.result-count { font-size: 0.82rem; color: var(--muted); margin: 0 0 8px; display: flex; gap: 10px; align-items: center; }

.loc-list, .task-list, .member-list, .link-list, .map-list { list-style: none; margin: 0; padding: 0; }
.loc-list { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.loc { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 11px 14px; background: var(--surface); }
.loc + .loc { border-top: 1px solid var(--border); }
.loc:hover { background: #1d2520; }
.dim { display: inline-block; font-size: 0.75rem; font-weight: 700; padding: 2px 6px; border-radius: 3px; border: 1px solid currentColor; white-space: nowrap; }
.dim-overworld { color: var(--overworld); }
.dim-nether { color: var(--nether); }
.dim-end { color: var(--end); }
.loc-body { min-width: 0; }
.loc-name { background: none; border: 0; padding: 0; color: var(--text); font-weight: 700; font-size: 1rem; text-align: left; text-decoration: none; }
.loc-name:hover { text-decoration: underline; text-underline-offset: 3px; }
.loc-name.static:hover { text-decoration: none; }
.cat { font-size: 0.75rem; color: var(--muted); margin-left: 6px; }
.loc-notes { color: var(--muted); font-size: 0.83rem; margin-top: 2px; overflow-wrap: anywhere; }
.loc-rel { font-size: 0.8rem; color: var(--warn); margin-top: 2px; }
.loc-coords { font-size: 0.95rem; color: #eef3d8; white-space: nowrap; }
.loc-actions { display: flex; gap: 4px; align-items: center; }
.star { background: none; border: 0; font-size: 1.3rem; color: var(--faint); width: 38px; height: 38px; border-radius: var(--radius); }
.star[aria-pressed="true"] { color: var(--warn); }
.star:hover:not(:disabled) { background: var(--surface-3); }
.star:disabled { cursor: default; opacity: 0.8; }

/* マップ */
.map-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.map-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 14px; }
.map-box { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: #141a17; }
.map-box canvas { display: block; width: 100%; height: 520px; touch-action: none; cursor: grab; }
.map-box canvas:active { cursor: grabbing; }
.map-help { font-size: 0.78rem; color: var(--muted); padding: 8px 12px; border-top: 1px solid var(--border); }
.map-help b { color: var(--warn); }
.map-side { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); display: flex; flex-direction: column; max-height: 600px; min-height: 0; }
#map-selected { border-bottom: 1px solid var(--border); }
.map-card { padding: 12px 14px; display: grid; gap: 8px; }
code.block { display: block; font-size: 0.92rem; color: #eef3d8; }
.map-list { overflow-y: auto; }
.map-list button { width: 100%; background: none; border: 0; border-bottom: 1px solid var(--border); color: var(--text); display: flex; justify-content: space-between; gap: 10px; padding: 9px 14px; text-align: left; font-size: 0.88rem; }
.map-list button:hover, .map-list button[aria-current="true"] { background: var(--surface-3); }
.map-list code { color: var(--muted); font-size: 0.8rem; white-space: nowrap; }

/* タスク */
.task-list { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-top: 12px; }
.task { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 14px; background: var(--surface); }
.task + .task { border-top: 1px solid var(--border); }
.task.status-done .task-body strong { color: var(--muted); text-decoration: line-through; }
.task-body p { font-size: 0.85rem; color: var(--muted); white-space: pre-wrap; }
.status-select { width: 100%; min-height: 34px !important; font-size: 0.85rem !important; }
.task.status-doing .status-select, .status-chip { color: var(--warn); }
.status-chip { font-size: 0.8rem; font-weight: 700; }

/* メンバー */
.team-grid { display: grid; gap: 14px; }
.member-list li, .link-list li { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.member-name { flex: 1; min-width: 120px; font-weight: 600; }
.link-list li span { flex: 1; min-width: 200px; font-size: 0.88rem; }
.team-grid form { margin: 10px 0 6px; }
.team-grid .panel > .btn { margin: 12px 0 4px; }

/* 座標ツール・設定 */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; align-items: start; }
.tool-grid .panel { display: grid; gap: 12px; }
.result { border: 1px solid #4f6b4a; background: #18241b; padding: 12px 14px; border-radius: var(--radius); display: grid; gap: 4px; }
.result output, .result .big { font-family: var(--mono); font-size: 1.5rem; font-weight: 700; color: var(--accent-text); }
.result .big { font-family: inherit; font-size: 1.2rem; }
.result .btn { justify-self: start; margin-top: 4px; }
.settings { max-width: 760px; margin-bottom: 14px; display: grid; gap: 10px; }
.settings input#nick { max-width: 280px; }

/* ---------------------------------------------------------------- ダイアログ */
dialog.dialog { background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); border-radius: 6px; padding: 0; width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 32px); overflow: auto; }
dialog.dialog.wide { width: min(940px, calc(100vw - 24px)); }
dialog::backdrop { background: rgba(0, 0, 0, 0.7); }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 16px 12px 20px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface); z-index: 1; }
.dialog-head h2 { font-size: 1.15rem; overflow-wrap: anywhere; }
.dialog-body { padding: 18px 20px 20px; }
.dialog-text { line-height: 1.8; }
.dialog-text b { color: var(--warn); }
.dialog-foot { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; padding-top: 6px; }
.push-left { margin-right: auto; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; }
.detail-side { display: grid; gap: 10px; align-content: start; border-left: 1px solid var(--border); padding-left: 20px; }
.detail-side h3 { color: var(--muted); font-size: 0.8rem; margin-top: 6px; }
.copy-list { display: grid; gap: 6px; }
.copy-line { justify-content: space-between; width: 100%; font-weight: 500; background: #0f1411; border-color: var(--border); }
.copy-line code { overflow: hidden; text-overflow: ellipsis; color: #eef3d8; }
.copy-line span { color: var(--accent-text); }
.meta { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; margin: 0; font-size: 0.85rem; }
.meta dt { color: var(--muted); }
.meta dd { margin: 0; }
.photo-grid { list-style: none; margin: 0 0 8px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 6px; }
.photo-grid li { position: relative; }
.photo-grid img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 3px; border: 1px solid var(--border); background: #0f1411; }
.photo-del { position: absolute; top: 3px; right: 3px; width: 28px; height: 28px; border-radius: 3px; border: 1px solid #7a4a42; background: rgba(40, 20, 18, 0.88); color: #ffd9d0; font-size: 1rem; line-height: 1; }
.file-btn { position: relative; cursor: pointer; }
.file-btn.busy { opacity: 0.6; pointer-events: none; }

/* ---------------------------------------------------------------- ログイン・公開ページ */
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.login-hero { background: #18211b; border-right: 1px solid var(--border); padding: clamp(28px, 6vw, 80px); display: flex; flex-direction: column; justify-content: center; gap: 28px; }
.brand.big { font-size: 1.3rem; }
.hero-copy { font-size: clamp(1.7rem, 3.6vw, 2.6rem); font-weight: 800; line-height: 1.4; letter-spacing: -0.01em; }
.hero-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; color: var(--muted); }
.hero-points li { padding-left: 16px; border-left: 3px solid #3d5a3a; }
.hero-points b { color: var(--text); }
.login-card { display: grid; align-content: center; gap: 16px; padding: clamp(28px, 6vw, 72px); max-width: 520px; }
.login-card h1 { font-size: 1.5rem; }
.btn.google { min-height: 48px; font-size: 1rem; }
.dev-login { border: 1px dashed var(--border-strong); border-radius: var(--radius); padding: 10px 12px; display: grid; gap: 8px; }
.public { max-width: 1100px; margin: 0 auto; }
.public-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; }
.public > h1 { margin-bottom: 4px; }
.public > .small { margin-top: 18px; }

/* ---------------------------------------------------------------- トースト */
#toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 12px); opacity: 0; pointer-events: none; z-index: 400; background: #dfeedd; color: #112010; padding: 10px 18px; border-radius: var(--radius); font-weight: 700; font-size: 0.9rem; max-width: min(92vw, 560px); text-align: center; transition: opacity 0.15s, transform 0.15s; overflow-wrap: anywhere; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast[data-kind="error"] { background: #f6d5ce; color: #3a1510; }

/* ---------------------------------------------------------------- レスポンシブ */
@media (max-width: 1050px) {
  .map-layout { grid-template-columns: 1fr; }
  .map-side { max-height: 360px; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-side { border-left: 0; padding-left: 0; border-top: 1px solid var(--border); padding-top: 14px; }
  .qa-fields { grid-template-columns: 1fr 1fr; }
  .qa-fields .btn { grid-column: 1 / -1; }
}
@media (max-width: 820px) {
  :root { font-size: 15px; }
  input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea, .select, .search { font-size: 16px; min-height: 44px; }
  .btn { min-height: 44px; }
  .btn.small { min-height: 38px; }
  .seg button { min-height: 42px; }
  .shell { display: block; }
  .sidebar { display: none; }
  .topbar { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--border); background: #151b17; position: sticky; top: 0; z-index: 50; }
  main { padding: 18px 16px calc(84px + env(safe-area-inset-bottom)); }
  .tabbar { display: grid; grid-template-columns: repeat(3, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: #151b17; border-top: 1px solid var(--border); padding: 4px 6px calc(4px + env(safe-area-inset-bottom)); }
  .tab-link { flex-direction: column; gap: 0; padding: 6px 4px; font-size: 0.72rem; justify-content: center; }
  .tab-link .nav-icon { font-size: 1.25rem; }
  .tab-link.active { color: var(--accent-text); }
  #toast { bottom: calc(80px + env(safe-area-inset-bottom)); }
  h1 { font-size: 1.45rem; }
  .page-head { align-items: flex-start; }
  .page-head > .btn { width: 100%; }
  .loc { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "dim dim" "body body" "coords actions"; gap: 6px 10px; padding: 12px; }
  .loc-dim { grid-area: dim; }
  .loc-body { grid-area: body; }
  .loc-coords { grid-area: coords; font-size: 0.9rem; white-space: normal; }
  .loc-actions { grid-area: actions; }
  .loc .btn.copy { min-height: 42px; padding: 6px 14px; }
  .filters .search { max-width: none; flex-basis: 100%; }
  .filters .select { flex: 1 1 40%; }
  .task { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "body edit" "status status"; }
  .task .task-body { grid-area: body; }
  .task .status-select, .task .status-chip { grid-area: status; }
  .task > .btn { grid-area: edit; }
  .map-box canvas { height: 62vh; min-height: 320px; }
  .login { grid-template-columns: 1fr; }
  .login-hero { border-right: 0; border-bottom: 1px solid var(--border); gap: 18px; }
  .login-card { max-width: none; }
  .seed-box { flex-wrap: wrap; }
  .world-row { grid-template-columns: 36px minmax(0, 1fr); padding: 12px; }
  .world-mark { width: 36px; height: 36px; }
  .world-updated { display: none; }
  dialog.dialog, dialog.dialog.wide { width: 100vw; max-width: 100vw; max-height: 100dvh; height: 100dvh; margin: 0; border-radius: 0; border: 0; }
  .dialog-foot { position: sticky; bottom: 0; background: var(--surface); padding: 10px 0 calc(6px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); }
  .dialog-foot .btn { flex: 1 1 auto; }
  /* 削除は保存の隣に置かず、別の行に離す（押し間違い防止） */
  .dialog-foot .push-left { margin: 6px 0 0; order: 3; flex-basis: 100%; }
}
@media (max-width: 480px) {
  .two-col { grid-template-columns: 1fr; }
  .qa-fields, .task-add .qa-fields { grid-template-columns: 1fr; }
  .xyz { gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* 規約・ポリシー */
.doc { max-width: 760px; margin: 0 auto; display: grid; gap: 14px; line-height: 1.85; }
.doc h1 { margin-top: 8px; }
.doc h2 { margin-top: 14px; font-size: 1.05rem; }
.doc ul { margin: 0; padding-left: 1.3em; display: grid; gap: 6px; }
