
:root {
  color: #202c26;
  background: #f4f5ef;
  font: 16px/1.65 system-ui, "Yu Gothic", Meiryo, sans-serif;
  --muted: #52635a;
  --line: #d6dfd7;
  --accent: #236749;
  --accent-dark: #174c35;
  --soft: #eaf4ec;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
.shell { width: min(1080px, calc(100% - 40px)); margin-inline: auto; }
.hero { background: #a7cf77; color: #20351a; border-bottom: 7px solid #80a84d; box-shadow: 0 4px #806347; }
.hero-inner { position: relative; }
.language { display: flex; align-items: center; gap: 8px; position: absolute; right: 0; top: 22px; font-size: .9rem; }
.language select { width: auto; }
@media (max-width: 600px) { .language { position: static; margin-top: 12px; } }
.hero-inner { padding-block: 28px 36px; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 750; letter-spacing: .035em; }
.brand-mark { width: 23px; height: 23px; background: linear-gradient(#487337 0 30%, #725331 30% 60%, #926e48 60%); box-shadow: inset -5px 0 #0002; }
.version { font-size: .72rem; color: #263f20; border: 1px solid #729651; padding: 0 8px; border-radius: 5px; }
.hero h1 { margin-top: 15px; font-size: clamp(1.9rem, 5vw, 2.7rem); letter-spacing: .03em; }
.hero p { margin-top: 6px; color: #2e4826; }
.hero-bottom { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 10px 18px; }
h1, h2, h3, p { margin: 0; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1.05rem; }
main.shell { padding-block: 22px 48px; }
.notice { display: flex; align-items: flex-start; gap: 12px; background: #fff5da; color: #573b12; border: 1px solid #e7c679; border-radius: 10px; padding: 13px 16px; margin-bottom: 17px; }
.notice-icon { display: grid; place-items: center; flex: 0 0 23px; height: 23px; border-radius: 50%; background: #805610; color: white; font-weight: 800; }
.notice p { font-size: .88rem; margin-top: 3px; }
.panel { background: white; border: 1px solid var(--line); border-radius: 12px; padding: 19px 22px; }
.setup-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 20px; margin-top: 12px; }
.game-version, .profile-control { display: grid; align-content: center; gap: 5px; }
.game-version label, .profile-control label, #entry-dialog label { font-size: .91rem; font-weight: 700; }
.file-area { border: 1px dashed #91a89b; background: #f8fbf8; border-radius: 9px; padding: 13px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px 13px; }
.file-area p { font-size: .85rem; overflow-wrap: anywhere; }
.file-area.dragging { border-color: var(--accent); background: var(--soft); }
.file-area:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; }
.setup > .hint { margin-top: 8px; }
.game-version button { justify-self: start; }
.hint { font-size: .85rem; color: var(--muted); }
.workspace { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr); align-items: start; gap: 18px; margin-top: 18px; }
.review-column { min-width: 0; }
.review-column:has(#ad-panel[hidden]) { position: sticky; top: 15px; }
#ad-panel { margin-top: 48px; text-align: center; }
#ad-label { font-size: .875rem; color: var(--muted); margin-bottom: 10px; }
#ad-panel:has(ins[data-ad-status="unfilled"]) { display: none; }
.review h2 { display: flex; align-items: center; gap: 8px; }
.review > .hint { margin-top: 8px; }
.migration-info { margin-top: 8px; padding: 8px 10px; background: var(--soft); border-radius: 6px; font-size: .85rem; }
.group-buttons { display: flex; flex-wrap: wrap; gap: 6px; margin: 11px 0; }
.group-buttons button[aria-pressed="true"] { background: var(--soft); border-color: #7aa589; color: #164b31; font-weight: 750; }
.profile-control { margin-bottom: 15px; }
button, .button, select, input[type="search"], input[type="text"] {
  font: inherit; color: inherit; background: #fff; border: 1px solid #aebfb4; border-radius: 7px;
  padding: 6px 12px; min-height: 40px;
}
select, input[type="search"], input[type="text"] { width: 100%; }
button, .button { font-size: .87rem; cursor: pointer; font-weight: 650; }
.button { display: inline-flex; align-items: center; }
button:hover:not(:disabled), .button:hover { background: #f0f6f0; }
.primary { background: var(--accent); border-color: var(--accent); color: white; }
.primary:hover:not(:disabled), .button.primary:hover { background: var(--accent-dark); }
button:disabled { opacity: .55; cursor: default; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.list-card { border: 1px solid var(--line); border-radius: 9px; margin-top: 12px; overflow: hidden; }
.count { display: inline-block; border-radius: 10px; padding: 0 7px; background: var(--soft); color: var(--accent-dark); font-size: .75rem; }
.rows, .changes, .results { list-style: none; padding: 0; margin: 0; }
.rows > li { display: flex; gap: 8px; align-items: center; padding: 7px 12px; border-top: 1px solid var(--line); }
.row-title { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.row-title code { font-size: .79rem; }
.row-actions { display: flex; gap: 5px; }
.row-actions button { padding: 3px 8px; min-height: 32px; font-size: .79rem; }
.list-hint { padding: 9px 12px; }
.changes { margin-top: 8px; max-height: 360px; overflow: auto; }
.changes li { font-size: .86rem; padding: 6px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.changes strong, .row-title span { display: block; font-size: .87rem; }
.backup-check { display: flex; align-items: flex-start; gap: 8px; margin: 14px 0 10px; font-size: .87rem; }
.backup-check input { margin: 5px 0 0; accent-color: var(--accent); }
.download { width: 100%; margin-top: 4px; }
.error { color: #8a1c19; background: #fff0ee; border-left: 3px solid #a73029; padding: 7px 10px; margin-top: 10px; font-size: .9rem; overflow-wrap: anywhere; }
dialog { width: min(560px, calc(100% - 28px)); max-height: calc(100dvh - 40px); background: white; color: inherit; border: 1px solid var(--line); border-radius: 13px; padding: 16px 20px; box-shadow: 0 15px 60px #0003; overflow: auto; }
dialog::backdrop { background: rgb(0 0 0 / 45%); }
.action-dialog form { display: grid; gap: 12px; }
.dialog-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.dialog-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.results { margin: 6px 0; max-height: 310px; overflow: auto; }
.results button { text-align: left; width: 100%; margin: 2px 0; overflow-wrap: anywhere; }
.results code { display: block; font-weight: normal; color: var(--muted); }
#search-panel input, #manual-panel input { margin: 4px 0 8px; }
#manual-panel p { margin-bottom: 8px; }
code { font-family: ui-monospace, Consolas, monospace; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (max-width: 720px) {
  .workspace, .setup-grid { grid-template-columns: minmax(0, 1fr); }
  .review-column:has(#ad-panel[hidden]) { position: static; }
  .setup-grid { gap: 12px; }
}
@media (max-width: 420px) {
  .shell { width: calc(100% - 24px); }
  .panel { padding: 14px; }
  .rows > li { padding-inline: 8px; }
}

.list-card > summary { cursor: pointer; padding: 9px 12px; font-weight: 700; background: #f4f7f0; }
.list-card > summary .count { margin-inline-start: 8px; }
.list-card > summary:focus-visible { outline-offset: -3px; }
.card-body { padding: 10px 12px; }
.field { display: grid; grid-template-columns: minmax(0, 1fr) minmax(70px, 42%); align-items: center; gap: 12px; padding: 6px 0; }
.field input, .field select { min-width: 0; }
.field-key { display: block; color: var(--muted); font-size: .8rem; overflow-wrap: anywhere; }
.field input[type=checkbox] { justify-self: start; width: 20px; height: 20px; accent-color: var(--accent); }
.profile-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.player-row { margin-bottom: 12px; }
.player-row code { overflow-wrap: anywhere; }
.site-footer { background: #e6ecde; border-top: 3px solid #a6bb8f; }
.footer-inner { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 18px; padding-block: 24px; font-size: .9rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 15px; margin-top: 6px; }
.site-footer nav a { color: #23452d; }
.support { margin-left: auto; padding: 7px 14px; color: #402d11; background: #ffe398; border: 1px solid #c6a350; border-radius: 7px; font-size: .9rem; font-weight: 700; }
