:root {
  --bg: #f7f4ee;
  --panel: #fffdf8;
  --panel-2: #f4efe5;
  --line: #dccfb8;
  --text: #2f2418;
  --muted: #7a6b58;
  --accent: #a67c52;
  --accent-soft: #efe3d3;
  --green: #4f7d57;
  --yellow: #b58a2a;
  --red: #b35547;
  --shadow: rgba(88, 59, 26, 0.08);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: linear-gradient(180deg, #fbf8f2 0%, #f2ece1 100%);
  color: var(--text);
}
a { color: inherit; text-decoration: none; }
.shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.sidebar {
  border-right: 1px solid var(--line);
  background: #f3eadb;
  position: sticky; top: 0; height: 100vh;
  padding: 28px 18px;
}
.brand { font-weight: 800; margin-bottom: 18px; font-size: 22px; color: #4b3722; }
.sidebar-title { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.nav { display: grid; gap: 10px; }
.nav a { padding: 12px 14px; border-radius: 12px; color: #6b5c49; background: rgba(255,255,255,.45); border: 1px solid transparent; }
.nav a:hover, .nav a.active { color: #3d2d1e; border-color: #ccb08a; background: #fffaf2; }
.main { padding: 30px; }
.hero { padding: 28px; border-radius: 24px; background: linear-gradient(135deg, #fffdf8, #f5ecdf); border: 1px solid var(--line); margin-bottom: 22px; }
.hero.compact { padding: 24px; }
.eyebrow { color: #9a7751; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 10px; }
h1, h2, h3 { margin: 0 0 10px; color: #3c2d1e; }
p { color: #5f513f; line-height: 1.7; }
.grid { display: grid; gap: 18px; margin-bottom: 18px; }
.grid.one { grid-template-columns: 1fr; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.two-uneven { grid-template-columns: minmax(300px, 440px) 1fr; }
.stack { display: grid; gap: 16px; }
.card { display: block; background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 20px; box-shadow: 0 12px 28px var(--shadow); }
.card:hover { border-color: #c8a97d; }
.map-card h2 { font-size: 28px; }
.meta-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 16px 0; }
.meta-grid.single-line { grid-template-columns: 1fr; }
.meta-grid div { padding: 12px; border-radius: 14px; background: var(--panel-2); border: 1px solid #e4d7c3; }
.meta-grid span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip { border-radius: 999px; padding: 7px 12px; font-size: 13px; background: var(--accent-soft); color: #7b5934; border: 1px solid #dfc4a2; }
.enter-row { margin-top: 16px; }
.enter-btn { display: inline-flex; align-items: center; justify-content: center; padding: 10px 14px; border-radius: 999px; background: #a67c52; color: white; font-weight: 700; }
.shortcut h3 { margin-bottom: 6px; }
.section-title { font-size: 15px; font-weight: 700; margin-bottom: 14px; color: #5a4630; }
.section-title.sub { margin-top: 18px; }
.list-row { display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid #eadfce; }
.list-row:last-child { border-bottom: none; }
.issue-mini, .timeline-item { padding: 12px 0; border-bottom: 1px solid #eadfce; }
.issue-mini:last-child, .timeline-item:last-child { border-bottom: none; }
.pill { display: inline-flex; align-items: center; justify-content: center; padding: 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; border: 1px solid rgba(0,0,0,.08); background: #f3eadf; color: #4c3b2a; }
.pill.p0 { background: #f4ded9; color: var(--red); }
.pill.p1 { background: #f3ead0; color: var(--yellow); }
.pill.p2, .pill.p3 { background: #dfeadf; color: var(--green); }
.date-card ul, .card ul { margin: 10px 0 0 18px; color: #5f513f; }
.date-card.wide { display: grid; grid-template-columns: minmax(360px, 1fr) 720px; gap: 20px; align-items: start; }
.date-card-thumb { display: flex; align-items: stretch; justify-content: flex-start; min-height: 160px; border-radius: 14px; overflow: hidden; background: #f7f2e8; border: 1px solid #e5d9c8; padding: 10px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.45); }
.date-thumb { display: block; width: 100%; height: 160px; object-fit: cover; border-radius: 10px; background: #efe7d8; }
.thumb-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; width: 100%; align-items: start; background: #f7f2e8; }
.playtest-card { display: grid; grid-template-columns: minmax(320px, 1fr) 520px 220px; gap: 18px; align-items: center; }
.playtest-card.compact { padding-top: 18px; padding-bottom: 18px; }
.playtest-card.with-thumbs { align-items: start; }
.playtest-side { display: grid; gap: 10px; padding-right: 8px; }
.playtest-side.right-side { justify-items: end; padding-right: 0; }
.playtest-main { min-width: 0; }
.playtest-main p { margin: 0 0 8px; }
.playtest-thumb-area { min-height: 160px; border-radius: 14px; overflow: hidden; background: #f7f2e8; border: 1px solid #e5d9c8; padding: 10px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.45); }
.playtest-link-btn { display: inline-flex; align-items: center; justify-content: center; padding: 10px 12px; border-radius: 12px; background: #a67c52; color: #fff; font-weight: 700; border: 1px solid #946b41; }
.playtest-link-empty { color: var(--muted); font-size: 12px; padding: 10px 12px; border-radius: 12px; background: #f7f2e8; border: 1px dashed #d8c5ab; }
.editor-toolbar { position: sticky; top: 52px; z-index: 14; display: flex; align-items: center; gap: 12px; padding: 10px 0; background: linear-gradient(180deg, #fbf8f2 0%, #f2ece1 100%); }
.editor-save-btn { border: 1px solid #946b41; background: #a67c52; color: #fff; border-radius: 12px; padding: 10px 14px; font-weight: 700; cursor: pointer; }
.editor-status { font-size: 12px; color: var(--muted); }
.brief-editor { margin-top: 14px; display: grid; gap: 10px; }
.brief-intro { padding: 10px 12px; border-radius: 12px; background: #f7f2e8; border: 1px solid #e5d9c8; color: #5f513f; }
.brief-block { padding: 12px; border-radius: 14px; background: #fcf8f1; border: 1px solid #e8dcc8; }
.brief-block-title { font-weight: 700; color: #4c3b2a; margin-bottom: 8px; }
.brief-inline-thumb { width: 100%; max-width: 320px; height: auto; display: block; border-radius: 10px; border: 1px solid #e5d9c8; margin-bottom: 10px; }
.brief-list { margin: 0 0 0 18px; }
.editable-playtest { align-items: start; }
.map-tabs, .subtools, .desktop-only-table { position: sticky; z-index: 12; background: linear-gradient(180deg, #fbf8f2 0%, #f2ece1 100%); }
.map-tabs { top: 0; padding-top: 6px; margin-bottom: 0; }
.subtools { top: 52px; padding: 8px 0; margin-bottom: 0; }
.desktop-only-table { top: 96px; padding-top: 10px; }
.thumb-empty { color: var(--muted); font-size: 12px; }
.back-link, .inline-link { color: #8c6239; font-weight: 600; }
.inline-link.small { display: inline-block; margin-top: 10px; }
.subtools { display: flex; justify-content: flex-end; margin: 0 0 12px; }
.simple-sort, .jump-select { min-width: 140px; padding: 6px 8px; border-radius: 10px; border: 1px solid #d8c5ab; background: #fffaf2; }
.detail-topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0 0 14px; }
.back-btn { border: 1px solid #d8c5ab; background: #fffaf2; color: #5a4630; border-radius: 10px; padding: 8px 12px; cursor: pointer; }
.gallery { display: grid; gap: 16px; }
.gallery-card { padding-bottom: 16px; }
.shot { margin: 0; padding: 0; border: none; border-radius: 0; overflow: visible; background: transparent; }
.shot + .shot { padding-top: 16px; border-top: 1px solid #eadfce; }
.shot img { display: block; width: 100%; height: auto; background: #f7f2e8; border: 1px solid #e5d9c8; border-radius: 18px; }
.shot figcaption { padding: 10px 2px 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.empty { color: var(--muted); }
.stats-grid { margin-bottom: 16px; }
.stat-card span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.stat-card strong { font-size: 28px; color: #4a3520; }
.tracking-table { overflow-x: auto; }
.map-tabs { display: flex; gap: 10px; margin: 0 0 14px; }
.map-tab { padding: 10px 16px; border-radius: 12px; border: 1px solid #dccfb8; background: #f8f2e8; color: #6b5c49; font-weight: 700; }
.map-tab.active { background: #fffaf2; color: #3d2d1e; border-color: #c8a97d; box-shadow: 0 6px 14px rgba(88,59,26,.08); }
.desktop-only-table { padding: 14px 16px; }
.table-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.toolbar-hint { font-size: 12px; }
.issue-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #efe3d3;
  border: 1px solid #dfc4a2;
  color: #7b5934;
  font-weight: 700;
  font-size: 12px;
  margin-bottom: 6px;
}
.table-scroll { overflow-x: auto; }
.compact-table { width: 1500px; border-collapse: collapse; table-layout: fixed; }
.compact-table th, .compact-table td { border-bottom: 1px solid #eadfce; padding: 8px 6px; vertical-align: top; text-align: left; font-size: 13px; color: #4d3f31; }
.compact-table th { position: sticky; top: 0; background: var(--panel); z-index: 1; color: #6f5840; font-size: 12px; }
.compact-table-v3 th:nth-child(1), .compact-table-v3 td:nth-child(1) { width: 88px; }
.compact-table-v3 th:nth-child(2), .compact-table-v3 td:nth-child(2) { width: 64px; }
.compact-table-v3 th:nth-child(3), .compact-table-v3 td:nth-child(3) { width: 72px; }
.compact-table-v3 th:nth-child(4), .compact-table-v3 td:nth-child(4) { width: 360px; }
.compact-table-v3 th:nth-child(5), .compact-table-v3 td:nth-child(5) { width: 82px; }
.compact-table-v3 th:nth-child(6), .compact-table-v3 td:nth-child(6) { width: 82px; }
.compact-table-v3 th:nth-child(7), .compact-table-v3 td:nth-child(7) { width: 112px; }
.compact-table-v3 th:nth-child(8), .compact-table-v3 td:nth-child(8) { width: 270px; }
.compact-table-v3 th:nth-child(9), .compact-table-v3 td:nth-child(9) { width: 150px; }
.cell-wrap { white-space: normal; line-height: 1.35; word-break: break-word; }
.foldable-text { position: relative; white-space: normal; word-break: break-word; overflow: hidden; }
.foldable-text.is-collapsed {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  max-height: 5.4em;
}
.fold-toggle {
  margin-top: 6px;
  padding: 2px 8px;
  border: 1px solid #d8c5ab;
  border-radius: 999px;
  background: #fffaf2;
  color: #7b5934;
  font-size: 12px;
  cursor: pointer;
}
.fold-toggle:hover { background: #f4ece0; }
.cell-title { font-weight: 700; color: #3c2d1e; margin-bottom: 4px; }
.cell-sub { color: var(--muted); font-size: 12px; line-height: 1.3; margin-top: 4px; }
.cell-select { width: 100%; min-width: 0; padding: 5px 6px; border-radius: 8px; border: 1px solid #d8c5ab; background: #fffaf2; color: #4d3f31; font-size: 12px; }
.priority-select.p0 { background: #f4ded9; }
.priority-select.p1 { background: #f3ead0; }
.priority-select.p2, .priority-select.p3 { background: #dfeadf; }
.meta-cell { position: relative; }
.meta-sub { font-size: 11px; color: var(--muted); margin-top: 4px; white-space: nowrap; }
.meta-tiny { font-size: 10px; }
.key-button, .copy-btn, .multi-trigger {
  border: 1px solid #d8c5ab; background: #fffaf2; color: #5a4630; border-radius: 8px; padding: 4px 8px; font-size: 12px; cursor: pointer;
}
.key-popover, .multi-menu {
  display: none; position: absolute; top: 8px; left: 8px; z-index: 3; min-width: 170px;
  background: #fffdf8; border: 1px solid #d8c5ab; border-radius: 12px; padding: 10px; box-shadow: 0 10px 24px rgba(88,59,26,.12);
}
.key-popover.show, .multi-menu.show { display: block; }
.key-popover .mono { margin-bottom: 8px; word-break: break-all; }
.multi-select { position: relative; }
.multi-trigger { width: 100%; text-align: left; }
.multi-menu { min-width: 120px; top: 30px; left: 0; }
.controls-panel { display: flex; align-items: flex-start; gap: 12px; margin: 0 0 12px; flex-wrap: nowrap; }
.sort-bar { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; }
.sort-bar label { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.sort-select { min-width: 140px; padding: 6px 8px; border-radius: 10px; border: 1px solid #d8c5ab; background: #fffaf2; }
.sort-direction { min-width: 84px; padding: 6px 8px; border-radius: 10px; border: 1px solid #d8c5ab; background: #fffaf2; }
.filters-label { margin-left: 18px; margin-right: 2px; font-size: 12px; color: var(--muted); line-height: 34px; }
.filter-groups { display: flex; flex-wrap: nowrap; gap: 10px; }
.filter-group { font-size: 12px; color: var(--muted); padding: 6px 10px; border: 1px solid #e3d6c2; border-radius: 12px; background: #fcf8f1; min-width: 110px; }
.filter-group summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: #5a4630; cursor: pointer; list-style: none; font-weight: 600; }
.filter-group summary::-webkit-details-marker { display: none; }
.filter-selected { color: var(--muted); font-weight: 400; font-size: 12px; }
.filter-multi { display: grid; gap: 2px; margin-top: 8px; padding-top: 8px; border-top: 1px solid #eadfce; max-height: 220px; overflow: auto; }
.multi-option { display: flex; align-items: center; gap: 6px; padding: 4px 0; font-size: 12px; }
.multi-option input { margin: 0; }
.area-a span { color: #9a5d28; }
.area-b span { color: #3867b4; }
.area-c span { color: #3f7d42; }
.prio-col, .area-col, .status-col { white-space: nowrap; }
.source-col { color: var(--muted); font-size: 12px; word-break: break-word; }
.image-col { text-align: center; }
.thumb-button { width: 100%; min-height: 64px; border: 1px dashed #d8c5ab; border-radius: 10px; background: #faf5ec; color: var(--muted); cursor: pointer; }
.thumb-placeholder { font-size: 12px; }
.status-select.is-pending { background: #f4ded9; color: #a3352a; }
.status-select.is-working { background: #e6eefc; color: #355f9d; }
.status-select.is-watch { background: #efe5fb; color: #7551a8; }
.status-select.is-done { background: #dff0df; color: #3f7d42; }
.status-select.is-muted { background: #ece7df; color: #7a6b58; }
.lightbox { display: none; position: fixed; inset: 0; background: rgba(20, 16, 12, .72); z-index: 30; align-items: center; justify-content: center; }
.lightbox.show { display: flex; }
.lightbox-image { max-width: 78vw; max-height: 78vh; border-radius: 12px; background: white; }
.lightbox-close, .lightbox-nav { position: absolute; border: none; background: rgba(255,255,255,.92); width: 44px; height: 44px; border-radius: 999px; font-size: 24px; cursor: pointer; }
.lightbox-close { top: 24px; right: 24px; }
.lightbox-nav.prev { left: 24px; }
.lightbox-nav.next { right: 24px; }
.feedback-switcher {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0 14px;
  position: sticky;
  top: 52px;
  z-index: 12;
  background: linear-gradient(180deg, #fbf8f2 0%, #f2ece1 100%);
  padding: 10px 0;
}
.feedback-switcher-label {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.feedback-select { min-width: 220px; }
.detail-topbar-left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.feedback-detail-tabs { display: flex; align-items: center; gap: 8px; }
.feedback-detail-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid #dccfb8;
  background: #f8f2e8;
  color: #6b5c49;
  font-weight: 700;
  font-size: 13px;
}
.feedback-detail-tab.active {
  background: #fffaf2;
  color: #3d2d1e;
  border-color: #c8a97d;
}
.feedback-detail-block {
  padding: 14px 0;
  border-bottom: 1px solid #eadfce;
}
.feedback-detail-block:last-child { border-bottom: none; }
.feedback-detail-block h3 { margin-bottom: 10px; }
.detail-inline-image {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 10px 0 12px;
  border-radius: 12px;
  border: 1px solid #e5d9c8;
  background: #f7f2e8;
}
.feedback-section-card { margin-bottom: 14px; }
.feedback-question { color: #7a6b58; margin-top: 0; }
.feedback-group { padding: 12px 0; border-bottom: 1px solid #eadfce; }
.feedback-group:last-of-type { border-bottom: none; }
.feedback-group-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.feedback-group-head strong { font-size: 22px; color: #a67c52; }
.feedback-group-head span { font-weight: 700; color: #3d2d1e; }
.feedback-group-head em { font-style: normal; color: var(--muted); font-size: 12px; }
.feedback-takeaway { margin-top: 12px; padding-top: 12px; border-top: 1px solid #eadfce; }
.feedback-issue-table { width: 100%; min-width: 960px; }
.detail-figure-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 220px));
  gap: 12px;
  justify-content: start;
}
.section-figure-grid { margin: 12px 0 8px; }
.detail-figure {
  margin: 0;
  border: 1px solid #e5d9c8;
  border-radius: 14px;
  background: #fffaf2;
  overflow: hidden;
  max-width: 220px;
}
.detail-figure img {
  display: block;
  width: 100%;
  height: auto;
  background: #f7f2e8;
}
.detail-figure figcaption {
  padding: 8px 10px 10px;
  color: #7a6b58;
  font-size: 12px;
  line-height: 1.5;
}
.playtest-link-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
[contenteditable="true"] { outline: none; border-radius: 6px; padding: 2px 4px; min-height: 18px; }
[contenteditable="true"]:focus { background: #fff4e7; box-shadow: inset 0 0 0 1px #d7b48a; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; }
