:root {
    --bg: #f7f7f8;
    --surface: #ffffff;
    --text: #111111;
    --muted: #6e6e80;
    --border: #e8e8ed;
    --accent: #000000;
    --on-accent: #ffffff;
    --star: #f5a524;
    --star-off: #d9d9e0;
    --ok-bg: #ecfdf3;
    --ok-text: #05603a;
    --err-bg: #fef3f2;
    --err-text: #b42318;
    --radius: 20px;
    --font: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0d0d0f;
        --surface: #17171a;
        --text: #ececf1;
        --muted: #9b9bab;
        --border: #2a2a30;
        --accent: #ececf1;
        --on-accent: #0d0d0f;
        --star-off: #3a3a42;
        --ok-bg: #0b2a1c;
        --ok-text: #6ce9a6;
        --err-bg: #2d1210;
        --err-text: #fda29b;
    }
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
.container { max-width: 1120px; margin: 48px auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.header {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 24px;
    margin-bottom: 20px;
    font-weight: 600;
    letter-spacing: -0.02em;
}
.header a { font-weight: 500; font-size: 14px; color: var(--muted); text-decoration: none; }
.header a:hover { color: var(--text); }

.panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
}
h1, h2 { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 16px; }

.summary { display: flex; gap: 40px; align-items: center; margin-bottom: 20px; flex-wrap: wrap; }
.score { text-align: center; min-width: 160px; }
.avg { font-size: 52px; font-weight: 600; letter-spacing: -0.04em; line-height: 1.1; }
.bars { flex: 1; min-width: 220px; display: grid; gap: 6px; }
.bar-row { display: grid; grid-template-columns: 32px 1fr 32px; align-items: center; gap: 10px; font-size: 14px; }
progress { appearance: none; width: 100%; height: 8px; border: 0; border-radius: 99px; background: var(--star-off); overflow: hidden; }
progress::-webkit-progress-bar { background: var(--star-off); border-radius: 99px; }
progress::-webkit-progress-value { background: var(--star); border-radius: 99px; }
progress::-moz-progress-bar { background: var(--star); border-radius: 99px; }

.stars { letter-spacing: 1px; white-space: nowrap; }
.stars i { font-style: normal; color: var(--star-off); }
.stars i.on { color: var(--star); }

.layout { display: grid; grid-template-columns: 1fr 360px; gap: 20px; align-items: start; }
.review { display: flex; gap: 14px; padding: 18px 0; border-top: 1px solid var(--border); }
.review:first-of-type { border-top: 0; padding-top: 4px; }
.avatar {
    flex: none; width: 40px; height: 40px; border-radius: 50%;
    display: grid; place-items: center;
    background: var(--accent); color: var(--on-accent); font-weight: 600;
}
.body { min-width: 0; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-bottom: 4px; }
.meta time { font-size: 13px; }
.review p { overflow-wrap: anywhere; }
.empty { padding: 24px 0; }
.pager { display: flex; justify-content: space-between; align-items: center; padding-top: 16px; border-top: 1px solid var(--border); font-size: 14px; }

.form { position: sticky; top: 20px; }
.form label, .form .label { display: block; font-size: 14px; font-weight: 500; margin: 14px 0 6px; }
.form input[type=text], .form textarea {
    width: 100%; font: inherit; font-size: 15px; color: var(--text);
    background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px;
}
.form textarea { resize: vertical; }
.form input:focus, .form textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.rate { border: 0; display: inline-flex; flex-direction: row-reverse; gap: 2px; }
.rate input { position: absolute; opacity: 0; pointer-events: none; }
.rate label { margin: 0; font-size: 30px; line-height: 1; cursor: pointer; color: var(--star-off); }
.rate input:checked ~ label,
.rate label:hover, .rate label:hover ~ label { color: var(--star); }
.rate input:focus-visible + label { outline: 2px solid var(--accent); border-radius: 4px; }

button {
    margin-top: 18px; width: 100%; font: inherit; font-weight: 600;
    background: var(--accent); color: var(--on-accent);
    border: 0; border-radius: 10px; padding: 12px; cursor: pointer;
}
button:hover { opacity: .88; }
.form .small { margin-top: 10px; }

.notice { border-radius: 10px; padding: 10px 12px; font-size: 14px; margin-bottom: 4px; list-style: none; }
.notice.ok { background: var(--ok-bg); color: var(--ok-text); }
.notice.err { background: var(--err-bg); color: var(--err-text); }

footer { text-align: center; padding: 28px 0 0; }

@media (max-width: 860px) {
    .container { margin: 16px auto; }
    .layout { grid-template-columns: 1fr; }
    .form { position: static; order: -1; }
    .panel { padding: 20px; }
    .summary { gap: 20px; }
}
