:root {
  --ink: #17231c;
  --muted: #66736b;
  --green: #315e44;
  --green-dark: #173c2a;
  --green-soft: #e8f0eb;
  --cream: #f5f3ed;
  --paper: #fff;
  --line: #dfe5e1;
  --danger: #a14336;
  --danger-soft: #f8e9e6;
  --shadow: 0 20px 60px rgba(22, 48, 33, .09);
  font-family: Inter, "Noto Sans JP", "Hiragino Kaku Gothic ProN", sans-serif;
  color: var(--ink);
  background: #f4f6f4;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 250px 1fr; }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 28px 18px; background: var(--green-dark); color: #fff; display: flex; flex-direction: column; }
.brand-block { display: flex; align-items: center; gap: 12px; padding: 0 8px 30px; border-bottom: 1px solid rgba(255,255,255,.12); }
.brand-mark, .mini-mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: #d8e6dc; color: var(--green-dark); font: 700 13px Georgia, serif; }
.brand-block strong { display: block; font: 600 15px Georgia, serif; letter-spacing: .08em; }
.brand-block span { display: block; margin-top: 4px; font-size: 11px; color: rgba(255,255,255,.55); }
.sidebar nav { display: grid; gap: 7px; margin-top: 28px; }
.nav-item { width: 100%; padding: 13px 14px; color: rgba(255,255,255,.67); background: transparent; border: 0; border-radius: 10px; text-align: left; cursor: pointer; transition: .2s; }
.nav-item span { display: inline-block; width: 28px; color: #aac0b0; }
.nav-item:hover, .nav-item.active { color: #fff; background: rgba(255,255,255,.1); }
.sidebar-foot { margin-top: auto; padding: 16px 8px 0; border-top: 1px solid rgba(255,255,255,.12); color: rgba(255,255,255,.62); font-size: 11px; }
.status-dot { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: #83c99a; box-shadow: 0 0 0 4px rgba(131,201,154,.12); }
.main-content { min-width: 0; padding: 32px 40px 60px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 30px; }
.topbar h1 { margin: 2px 0 0; font: 500 clamp(24px,3vw,34px) Georgia, "Yu Mincho", serif; }
.eyebrow { margin: 0; color: var(--green); font-size: 10px; font-weight: 700; letter-spacing: .17em; }
.top-actions, .dialog-actions, .draft-actions { display: flex; gap: 10px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 17px; border: 1px solid transparent; border-radius: 9px; text-decoration: none; font-size: 13px; font-weight: 600; cursor: pointer; transition: .2s; }
.button:hover { transform: translateY(-1px); }
.button.primary { background: var(--green); color: #fff; box-shadow: 0 8px 20px rgba(49,94,68,.16); }
.button.ghost { background: #fff; border-color: var(--line); color: var(--ink); }
.button.small { min-height: 34px; padding: 0 12px; font-size: 12px; }
.view { display: none; }
.view.active { display: block; animation: enter .28s ease-out; }
@keyframes enter { from { opacity: 0; transform: translateY(7px); } }
.notice { margin-bottom: 18px; padding: 13px 16px; border: 1px solid #cad9cf; border-radius: 10px; background: #eef4f0; color: #4e6556; font-size: 12px; line-height: 1.7; }
.notice strong { color: var(--green-dark); }
.metric-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin-bottom: 18px; }
.metric-card, .panel, .link-card, .survey-card { background: var(--paper); border: 1px solid #e3e8e4; border-radius: 16px; box-shadow: 0 8px 30px rgba(22,48,33,.04); }
.metric-card { position: relative; padding: 20px; }
.metric-card span, .metric-card small { display: block; color: var(--muted); font-size: 11px; }
.metric-card strong { display: block; margin: 8px 0 7px; font: 500 31px Georgia, serif; }
.metric-icon { position: absolute; top: 18px; right: 18px; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--green-soft); color: var(--green); font-weight: 700; }
.content-grid { display: grid; grid-template-columns: minmax(0,1.8fr) minmax(250px,.8fr); gap: 18px; margin-bottom: 18px; }
.panel { padding: 22px; margin-bottom: 18px; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.panel h2 { margin: 4px 0 0; font: 500 19px Georgia, "Yu Mincho", serif; }
.muted { color: var(--muted); font-size: 11px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th { padding: 10px 12px; color: #869188; font-size: 10px; text-align: left; border-bottom: 1px solid var(--line); }
td { padding: 14px 12px; border-bottom: 1px solid #edf0ee; }
tr:last-child td { border-bottom: 0; }
.rating, .stars { color: #ad7e28; letter-spacing: .04em; }
.number-alert { color: var(--danger); font-weight: 700; }
.badge { display: inline-flex; align-items: center; padding: 4px 8px; border-radius: 999px; font-size: 10px; font-weight: 700; }
.badge.danger { color: var(--danger); background: var(--danger-soft); }
.badge.good { color: #2f6b45; background: #e9f3ec; }
.badge.neutral { color: #657068; background: #eef1ef; }
.text-button { padding: 0; border: 0; background: none; color: var(--green); font-size: 11px; font-weight: 700; cursor: pointer; }
.topic-list { display: grid; gap: 16px; }
.topic-row > div:first-child { display: flex; justify-content: space-between; font-size: 11px; }
.bar { height: 5px; margin-top: 7px; overflow: hidden; background: #edf1ee; border-radius: 9px; }
.bar i { display: block; height: 100%; background: #6a9278; border-radius: 9px; }
.review-list { display: grid; gap: 12px; }
.review-list.compact { grid-template-columns: repeat(2,minmax(0,1fr)); }
.review-card { padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: 13px; }
.review-card.attention { border-left: 4px solid #bd6558; }
.review-meta, .review-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.review-meta .stars { margin-left: 8px; font-size: 11px; }
.review-meta time { color: #939b96; font-size: 10px; }
.review-body { padding: 14px 0 16px; }
.review-body strong { font-size: 12px; }
.review-body p { margin: 7px 0 0; color: #526058; font-size: 12px; line-height: 1.8; }
.status-label { color: #8d695f; font-size: 10px; font-weight: 700; }
.status-label.done { color: #4b7c5c; }
.filter-row { display: flex; gap: 8px; margin-bottom: 16px; }
.chip { padding: 8px 13px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--muted); font-size: 11px; cursor: pointer; }
.chip.active { background: var(--green); color: #fff; border-color: var(--green); }
.split-hero { display: grid; grid-template-columns: 1.4fr .8fr; gap: 25px; padding: 35px; margin-bottom: 18px; border-radius: 18px; background: var(--green-dark); color: #fff; }
.split-hero .eyebrow { color: #a9c2b1; }
.split-hero h2 { margin: 9px 0 14px; font: 400 clamp(28px,4vw,43px)/1.35 Georgia, "Yu Mincho", serif; }
.split-hero p { max-width: 610px; color: rgba(255,255,255,.65); font-size: 13px; line-height: 1.9; }
.compliance-card { padding: 20px; align-self: center; border: 1px solid rgba(255,255,255,.14); border-radius: 14px; background: rgba(255,255,255,.06); }
.compliance-card ul { margin: 12px 0 0; padding-left: 18px; color: rgba(255,255,255,.72); font-size: 11px; line-height: 2.1; }
.compliance-card ol { margin: 12px 0 0; padding-left: 20px; color: rgba(255,255,255,.72); font-size: 11px; line-height: 2.1; }
.link-grid, .settings-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.link-card { padding: 18px; }
.link-card span, .link-card strong { display: block; }
.link-card span { color: var(--muted); font-size: 10px; }
.link-card strong { margin-top: 3px; font-size: 14px; }
.link-card code { display: block; margin: 14px 0; padding: 9px; overflow: hidden; background: #f5f7f5; color: #657068; border-radius: 7px; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.link-card > div:last-child { display: flex; gap: 8px; }
.settings-card { margin: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px; }
label { display: grid; gap: 7px; color: #55625a; font-size: 11px; font-weight: 600; }
label.full { grid-column: 1/-1; }
input, textarea, select { width: 100%; padding: 11px 12px; color: var(--ink); background: #fafbfa; border: 1px solid #dce3de; border-radius: 8px; outline: none; resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: #6f9c7f; box-shadow: 0 0 0 3px rgba(85,127,99,.1); }
.panel-actions { display: flex; justify-content: flex-end; margin-top: 16px; }
.invite-form { display: grid; grid-template-columns: 1fr 1fr 1fr auto; align-items: end; gap: 12px; }
.invite-result { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 18px; padding: 17px 18px; border: 1px solid #bfd2c5; border-radius: 12px; background: var(--green-soft); }
.invite-result > div { min-width: 0; }
.invite-result span, .invite-result strong, .invite-result small { display: block; }
.invite-result span { color: var(--muted); font-size: 10px; }
.invite-result strong { margin: 5px 0; font: 600 25px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .06em; }
.invite-result small { color: var(--muted); font-size: 10px; }
.table-note { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; }
.scope-primary { display: block; color: var(--green-dark); font-size: 12px; }
.scope-list { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.scope-list span { padding: 4px 7px; color: var(--green); background: var(--green-soft); border-radius: 999px; font-size: 9px; white-space: nowrap; }
.scope-actions { display: grid; justify-items: start; gap: 5px; }
.scope-remove { font-size: 9px; white-space: nowrap; }
.empty-row { padding: 24px 8px; color: var(--muted); text-align: center; font-size: 11px; }
.dialog { width: min(680px, calc(100vw - 28px)); padding: 0; border: 0; border-radius: 18px; box-shadow: var(--shadow); }
.dialog::backdrop { background: rgba(11,27,18,.62); backdrop-filter: blur(4px); }
.dialog-card { position: relative; padding: 28px; }
.dialog-card h2 { margin: 5px 0 18px; font: 500 24px Georgia, serif; }
.dialog-close { position: absolute; top: 15px; right: 17px; border: 0; background: none; font-size: 25px; cursor: pointer; }
.source-review { padding: 15px; margin-bottom: 17px; background: #f4f7f5; border-radius: 10px; }
.source-review span, .source-review strong { display: block; font-size: 11px; }
.source-review p { margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.policy-note, .survey-policy, .copy-hint { color: #7a857e; font-size: 10px; line-height: 1.7; }
.dialog-actions { justify-content: flex-end; margin-top: 18px; }
.login-dialog { width: min(470px, calc(100vw - 28px)); }
.login-copy { margin: -7px 0 19px; color: var(--muted); font-size: 11px; line-height: 1.8; }
.login-button { width: 100%; margin-top: 16px; }
.login-error { margin: 9px 0 0; color: var(--danger); font-size: 10px; }
.toast { position: fixed; z-index: 99; left: 50%; bottom: 25px; padding: 12px 17px; color: #fff; background: #1d4430; border-radius: 9px; font-size: 12px; box-shadow: var(--shadow); opacity: 0; transform: translate(-50%, 20px); pointer-events: none; transition: .25s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: #943f34; }
.empty-state { padding: 50px; text-align: center; color: var(--muted); }
.empty-state strong, .empty-state span { display: block; }
.empty-state span { margin-top: 6px; font-size: 11px; }

.survey-body { min-height: 100vh; background: var(--cream); }
.survey-shell { width: min(690px, calc(100% - 28px)); margin: 0 auto; padding: 28px 0 70px; }
.survey-header { display: flex; align-items: center; gap: 11px; }
.survey-header span, .survey-header strong { display: block; }
.survey-header span { color: var(--muted); font-size: 10px; }
.survey-header strong { margin-top: 2px; font: 500 14px Georgia, serif; }
.survey-intro { padding: 65px 12px 30px; }
.survey-intro h1 { margin: 9px 0 17px; font: 400 clamp(35px,8vw,56px)/1.35 Georgia, "Yu Mincho", serif; letter-spacing: .02em; }
.survey-intro > p:last-child { max-width: 490px; color: var(--muted); font-size: 13px; line-height: 1.9; }
.survey-card { padding: clamp(22px,5vw,40px); }
.step { display: grid; grid-template-columns: 36px 1fr; gap: 12px; padding: 21px 0; border-bottom: 1px solid #e9edea; }
.step:first-child { padding-top: 0; }
.step > span { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 50%; background: var(--green-soft); color: var(--green); font-size: 9px; font-weight: 700; }
.step em { color: #a75246; font-size: 9px; font-style: normal; }
.step small { color: var(--muted); font-size: 9px; font-weight: 500; }
.choice-step { min-width: 0; margin: 0; border: 0; border-bottom: 1px solid #e9edea; }
.choice-question { min-width: 0; }
.choice-question legend { width: 100%; margin: 0 0 13px; padding: 0; font-size: 13px; font-weight: 700; line-height: 1.65; }
.choice-grid { display: grid; gap: 8px; }
.choice-option { display: grid; grid-template-columns: 18px 1fr; align-items: center; gap: 10px; min-height: 45px; padding: 10px 13px; border: 1px solid #dfe6e1; border-radius: 11px; background: #fff; color: #435048; font-size: 12px; font-weight: 500; line-height: 1.55; cursor: pointer; transition: border-color .18s, background .18s, box-shadow .18s; }
.choice-option:hover { border-color: #a8bcae; background: #f9fbf9; }
.choice-option:has(input:checked) { border-color: var(--green); background: var(--green-soft); box-shadow: 0 0 0 2px rgba(58,92,69,.08); }
.choice-option input { width: 17px; height: 17px; margin: 0; accent-color: var(--green); }
.confirm-row { display: grid; grid-template-columns: 19px 1fr; gap: 10px; margin: 24px 0; font-weight: 400; line-height: 1.7; }
.confirm-row input { width: 17px; height: 17px; margin-top: 2px; }
.survey-submit { width: 100%; min-height: 55px; justify-content: space-between; padding: 0 21px; }
.survey-policy { margin: 15px 4px 0; text-align: center; }
.draft-card { margin-top: 17px; }
.draft-card h2 { margin: 6px 0 8px; font: 500 24px Georgia, serif; }
.draft-card > p:not(.eyebrow):not(.copy-hint) { color: var(--muted); font-size: 12px; line-height: 1.8; }
.draft-card textarea { margin: 15px 0; font-size: 14px; line-height: 1.85; }
.draft-actions .button { flex: 1; }
.copy-hint { text-align: center; }
.website-review-panel { margin-top: 24px; padding-top: 24px; border-top: 1px solid #e3e8e4; }
.website-review-panel h3 { margin: 6px 0 8px; font: 500 19px Georgia, "Yu Mincho", serif; }
.website-review-panel > p:not(.eyebrow):not(.copy-hint) { margin: 0 0 17px; color: var(--muted); font-size: 11px; line-height: 1.8; }
.website-review-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; margin-bottom: 15px; }
.website-review-fields label:last-child { grid-column: 1 / -1; }
.website-review-fields small { color: var(--muted); font-size: 9px; font-weight: 500; }
.website-review-fields em, .website-rating-field em { color: #a75246; font-size: 9px; font-style: normal; }
.website-rating-field { display: grid; gap: 7px; align-content: start; color: #55625a; font-size: 11px; font-weight: 600; }
.website-star-picker { display: flex; gap: 3px; min-height: 42px; align-items: center; }
.website-star-picker button { padding: 2px; color: #d7dcd9; background: transparent; border: 0; font-size: 27px; line-height: 1; cursor: pointer; transition: color .15s, transform .15s; }
.website-star-picker button.active { color: #e4a72a; }
.website-star-picker button:hover { transform: translateY(-1px); }
.website-button { width: 100%; min-height: 50px; color: #fff; background: #a08968; }

.reply-shell { width: min(620px, calc(100% - 24px)); }
.reply-intro { padding-top: 48px; }
.reply-intro h1 { font-size: clamp(34px, 8vw, 50px); }
.reply-loading { color: var(--muted); text-align: center; font-size: 12px; }
.reply-error h2, .reply-success h2 { margin: 7px 0 10px; font: 500 25px Georgia, "Yu Mincho", serif; }
.reply-error > p:last-child, .reply-success > p:last-child { color: var(--muted); font-size: 12px; line-height: 1.8; }
.reply-review-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.reply-reviewer { display: block; font-size: 14px; }
.reply-comment { margin: 8px 0 24px; padding-bottom: 22px; color: #526058; border-bottom: 1px solid var(--line); font-size: 13px; line-height: 1.9; }
.reply-text-label { font-size: 12px; }
.reply-text-label textarea { margin-top: 3px; font-size: 14px; line-height: 1.85; }
.reply-confirm { margin-bottom: 18px; }
.reply-policy { margin: 14px 4px 0; text-align: center; }
.reply-success { text-align: center; }
.reply-success-mark { display: grid; place-items: center; width: 54px; height: 54px; margin: 0 auto 18px; color: #fff; background: var(--green); border-radius: 50%; font-size: 25px; }

@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 20; right: 12px; bottom: 12px; left: 12px; top: auto; width: auto; height: auto; padding: 8px; border-radius: 14px; box-shadow: var(--shadow); }
  .brand-block, .sidebar-foot { display: none; }
  .sidebar nav { grid-template-columns: repeat(5,1fr); gap: 4px; margin: 0; }
  .nav-item { padding: 10px 5px; text-align: center; font-size: 9px; }
  .nav-item span { display: block; width: auto; margin-bottom: 3px; }
  .main-content { padding: 24px 18px 100px; }
  .metric-grid { grid-template-columns: repeat(2,1fr); }
  .content-grid { grid-template-columns: 1fr; }
  .review-list.compact { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .invite-form { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .topbar { align-items: flex-start; }
  .top-actions { flex-direction: column; }
  .top-actions .button { min-height: 36px; padding: 0 10px; font-size: 10px; }
  .metric-grid { gap: 9px; }
  .metric-card { padding: 16px; }
  .metric-card strong { font-size: 25px; }
  .metric-icon { top: 13px; right: 13px; }
  .panel { padding: 17px; }
  .split-hero { grid-template-columns: 1fr; padding: 25px; }
  .link-grid, .form-grid { grid-template-columns: 1fr; }
  .invite-form { grid-template-columns: 1fr; }
  .invite-result { align-items: stretch; flex-direction: column; }
  label.full { grid-column: auto; }
  .draft-actions { flex-direction: column; }
  .website-review-fields { grid-template-columns: 1fr; }
  .website-review-fields label:last-child { grid-column: auto; }
}
