:root {
  color-scheme: dark;
  --ink: #eef1ea;
  --muted: #929d94;
  --bg: #0d1210;
  --panel: #171e1a;
  --panel-2: #202923;
  --line: #36423a;
  --gold: #d8a94a;
  --green: #63b282;
  --red: #df786f;
  font-family: Inter, "Noto Sans JP", "Yu Gothic UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; color: var(--ink); background: radial-gradient(circle at 90% -10%, rgb(104 80 40 / 24%), transparent 34rem), var(--bg); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .45; }
.admin-header { position: sticky; z-index: 10; top: 0; display: flex; min-height: 68px; padding: 11px clamp(16px, 4vw, 56px); border-bottom: 1px solid rgb(255 255 255 / 8%); align-items: center; justify-content: space-between; background: rgb(13 18 16 / 91%); backdrop-filter: blur(16px); }
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.brand-mark { display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid var(--gold); border-radius: 50%; color: #f1d58f; font-family: Georgia, serif; font-size: 22px; }
.brand b, .brand small { display: block; }.brand b { font-family: Georgia, serif; font-size: 15px; letter-spacing: .07em; }.brand small { margin-top: 2px; color: var(--muted); font-size: 8px; letter-spacing: .18em; }
main { width: min(1260px, calc(100% - 28px)); margin: 0 auto; padding: 30px 0 60px; }
h1, h2, h3, p { margin-top: 0; } h1, h2 { font-family: Georgia, "Yu Mincho", serif; font-weight: 500; } h1 { font-size: clamp(31px, 5vw, 48px); } h2 { margin-bottom: 7px; font-size: 28px; } h3 { font-size: 12px; letter-spacing: .08em; } p { color: var(--muted); line-height: 1.7; }
.eyebrow { display: block; margin-bottom: 10px; color: var(--gold); font-size: 10px; font-weight: 800; letter-spacing: .2em; }
.btn { min-height: 38px; padding: 8px 15px; border: 1px solid transparent; border-radius: 7px; color: #111612; background: var(--gold); font-weight: 800; }
.btn.secondary { border-color: #4b594f; color: var(--ink); background: #28332d; }.btn.ghost { border-color: #3d4941; color: #bac3bb; background: transparent; }.btn.danger { border-color: #75433e; color: #ffd0cc; background: #3b2422; }.btn.small { min-height: 30px; padding: 5px 9px; font-size: 10px; }
.notice { position: fixed; z-index: 30; top: 78px; left: 50%; max-width: calc(100% - 24px); padding: 10px 14px; border: 1px solid #67532d; border-radius: 8px; color: #f1dda9; background: #30281b; box-shadow: 0 16px 40px #0008; transform: translateX(-50%); }.notice.error { border-color: #70423f; color: #ffd2cf; background: #351f1e; }
.login-wrap { display: grid; min-height: calc(100vh - 150px); place-items: center; }.login-card { width: min(440px, 100%); padding: 34px; border: 1px solid var(--line); border-radius: 16px; background: linear-gradient(145deg, #1d2621, #141a17); box-shadow: 0 26px 70px #0007; }
label > span, legend { display: block; margin-bottom: 7px; color: #bbc4bc; font-size: 11px; }
input, select, textarea { width: 100%; padding: 11px 12px; border: 1px solid #3c4941; border-radius: 7px; outline: none; color: var(--ink); background: #101512; } textarea { resize: vertical; } input:focus, select:focus, textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px #d8a94a1c; } label small { display: block; margin-top: 5px; color: #6f7b72; font-size: 9px; }
.login-card label { margin-bottom: 16px; }.login-card .btn { width: 100%; }
.admin-nav { display: flex; gap: 5px; margin-bottom: 28px; padding: 5px; border: 1px solid var(--line); border-radius: 10px; background: #111713; }.admin-nav button { flex: 1; padding: 10px; border: 0; border-radius: 6px; color: #7f8b82; background: transparent; }.admin-nav button.active { color: #171b18; background: var(--gold); font-weight: 800; }
.page-head { display: flex; margin-bottom: 22px; align-items: end; justify-content: space-between; gap: 20px; }.page-head p { margin-bottom: 0; }
.panel { padding: 22px; border: 1px solid var(--line); border-radius: 13px; background: var(--panel); box-shadow: 0 14px 36px #0003; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }.settings-grid label { padding: 15px; border: 1px solid #323e36; border-radius: 9px; background: #131915; }.settings-grid label strong { display: block; margin-bottom: 4px; font-size: 13px; }.settings-grid label p { min-height: 36px; margin-bottom: 11px; font-size: 10px; line-height: 1.5; }.settings-actions { display: flex; margin-top: 18px; align-items: center; justify-content: space-between; gap: 15px; }.draft-total { color: #c4b181; font-size: 12px; }
.summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }.summary-card { padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: #151c18; }.summary-card span { display: block; color: #77827a; font-size: 9px; letter-spacing: .12em; }.summary-card b { display: block; margin-top: 5px; color: #e4cb8b; font-family: Georgia, serif; font-size: 27px; }
.page-head-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.csv-import-panel { display: grid; grid-template-columns: minmax(230px, .75fr) minmax(420px, 1.25fr); gap: 22px; margin-bottom: 18px; align-items: end; }
.csv-import-panel h2 { margin-bottom: 5px; font-size: 21px; }
.csv-import-panel p { margin-bottom: 0; font-size: 11px; }
.csv-import-form { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(170px, .55fr) auto; gap: 8px; align-items: end; }
.csv-import-form label { min-width: 0; }
.csv-import-form input[type="file"] { padding: 8px; font-size: 10px; }
.csv-import-help { grid-column: 1 / -1; padding-top: 10px; border-top: 1px solid #303a33; color: #7f8b82; font-size: 10px; }
.csv-import-help code { color: #d9c487; }
.csv-import-status { display: grid; gap: 10px; }
.csv-import-status > div:first-child { color: #d9c487; font-size: 12px; font-weight: 800; }
.csv-progress-track { height: 9px; overflow: hidden; border-radius: 999px; background: #0c110e; }
.csv-progress-track span { display: block; height: 100%; background: var(--gold); transition: width .2s; }
.csv-import-error { margin: 0; color: #ffaaa4; font-size: 11px; }
.csv-import-result { margin-bottom: 18px; }
.csv-import-result .page-head { margin-bottom: 14px; }
.csv-failure-list { display: grid; gap: 8px; }
.csv-failure-list > div { padding: 11px 13px; border: 1px solid #603c38; border-radius: 8px; background: #241817; }
.csv-failure-list strong, .csv-failure-list span { display: block; }
.csv-failure-list span { margin-top: 3px; color: #a78e89; font-size: 9px; }
.csv-failure-list p { margin: 6px 0 0; color: #ffaaa4; font-size: 11px; }
.csv-import-success { margin: 0; color: #a9dbb8; }
.toolbar { display: grid; grid-template-columns: auto minmax(180px, 1fr) 150px auto; gap: 9px; margin-bottom: 12px; }.segmented { display: flex; padding: 3px; border: 1px solid var(--line); border-radius: 8px; background: #111713; }.segmented button { padding: 6px 10px; border: 0; border-radius: 5px; color: #859087; background: transparent; font-size: 10px; }.segmented button.active { color: #f1d995; background: #302a1b; }
.card-table { overflow: hidden; border: 1px solid var(--line); border-radius: 10px; }.card-row { display: grid; grid-template-columns: 86px minmax(150px, 1.5fr) minmax(130px, 1fr) 90px 70px 72px; gap: 10px; min-height: 54px; padding: 9px 12px; border-top: 1px solid #303a33; align-items: center; background: #151c18; }.card-row:first-child { border-top: 0; }.card-row.header { min-height: 34px; color: #6f7b72; background: #111713; font-size: 9px; letter-spacing: .08em; }.card-id { overflow: hidden; color: #7f8b82; font-family: ui-monospace, monospace; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }.card-main strong, .card-main small { display: block; }.card-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }.card-main small { margin-top: 3px; color: #78847b; font-size: 9px; }.badge { width: fit-content; padding: 4px 7px; border: 1px solid #4b574f; border-radius: 999px; color: #9ba69d; font-size: 8px; }.badge.live { border-color: #407252; color: #a9dbb8; }.badge.restricted { border-color: #7c6334; color: #e7ce8d; }.empty { padding: 36px; color: #748078; text-align: center; }
dialog { width: min(760px, calc(100% - 24px)); max-height: 92vh; padding: 0; overflow: auto; border: 1px solid #566259; border-radius: 14px; color: var(--ink); background: #171e1a; box-shadow: 0 30px 100px #000; } dialog::backdrop { background: #020503cc; backdrop-filter: blur(7px); } #card-form { padding: 24px; }.dialog-heading { display: flex; align-items: start; justify-content: space-between; }.icon-btn { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 50%; color: #b9c2ba; background: transparent; font-size: 20px; }.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; }.form-grid .full { grid-column: 1 / -1; } fieldset { margin: 0; padding: 0; border: 0; }.color-options { display: flex; gap: 7px; }.color-options label { cursor: pointer; }.color-options input { position: absolute; opacity: 0; pointer-events: none; }.color-options span { display: grid; width: 34px; height: 34px; margin: 0; place-items: center; border: 1px solid #455148; border-radius: 50%; background: #202923; }.color-options input:checked + span { border-color: var(--gold); color: #171b18; background: var(--gold); font-weight: 900; }.dialog-actions { display: flex; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); justify-content: flex-end; gap: 8px; }
.type-options { display: flex; flex-wrap: wrap; gap: 7px; }.type-options label { cursor: pointer; }.type-options input { position: absolute; opacity: 0; pointer-events: none; }.type-options span { display: block; margin: 0; padding: 7px 10px; border: 1px solid #455148; border-radius: 999px; color: #9ba69d; background: #202923; font-size: 10px; }.type-options input:checked + span { border-color: var(--gold); color: #171b18; background: var(--gold); font-weight: 800; }.type-options input:disabled + span { cursor: default; opacity: .75; }
.security-card { max-width: 620px; }.security-card form { display: grid; gap: 14px; }.security-card .btn { width: fit-content; }
.dialog-spacer { flex: 1; }
.image-source-controls { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.image-choice-content { padding: 24px; }
.image-choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; max-height: 68vh; overflow-y: auto; }
.image-choice { padding: 5px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: #101512; text-align: left; }
.image-choice:hover { border-color: var(--gold); }
.image-choice img { display: block; width: 100%; aspect-ratio: 5 / 7; border-radius: 6px; object-fit: cover; }
.image-choice span { display: block; padding: 7px 3px 2px; color: var(--muted); font-size: 9px; }
#loading-dialog { width: min(380px, calc(100% - 32px)); overflow: hidden; }
.loading-dialog-content { padding: 34px 28px 30px; text-align: center; }
.loading-dialog-content .eyebrow { margin-top: 18px; }
.loading-dialog-content h2 { font-size: 23px; }
.loading-dialog-content p { margin-bottom: 0; font-size: 12px; }
.loading-spinner { width: 46px; height: 46px; margin: 0 auto; border: 3px solid #39443d; border-top-color: var(--gold); border-radius: 50%; animation: loading-spin .8s linear infinite; }
@keyframes loading-spin { to { transform: rotate(360deg); } }

@media (max-width: 760px) {
  main { width: min(100% - 18px, 1260px); padding-top: 18px; }.page-head { display: block; }.page-head .btn { margin-top: 10px; }.settings-grid, .form-grid, .csv-import-panel, .csv-import-form { grid-template-columns: 1fr; }.form-grid .full { grid-column: auto; }.toolbar { grid-template-columns: 1fr 1fr; }.toolbar input { grid-column: 1 / -1; grid-row: 1; }.card-row { grid-template-columns: 68px 1fr 58px; }.card-row > :nth-child(3), .card-row > :nth-child(4), .card-row.header > :nth-child(3), .card-row.header > :nth-child(4) { display: none; }.summary-grid { grid-template-columns: 1fr; }.brand small { display: none; }
}
