/* AI 판사: a courtroom seen from above on a sky-blue tiled floor. The bench and the two seats are
   white blocks with ink edges; the verdict is a seesaw scale that tips toward the side with more fault.
   One column on phones; from 980px the scale sits on the left and the papers on the right. */
.court-page { --floor-line: rgba(255, 255, 255, 0.34); }
.court-page .site-bar .site-header-inner,
.court-page .site-footer.is-slim .site-footer-inner { max-width: 1104px; }
.court-page .site-main {
    background-color: var(--sky);
    background-image:
        linear-gradient(var(--floor-line) 1.5px, transparent 1.5px),
        linear-gradient(90deg, var(--floor-line) 1.5px, transparent 1.5px);
    background-size: 34px 34px;
}
.court [hidden] { display: none !important; }
.tabular { font-variant-numeric: tabular-nums; }

.court { max-width: 600px; margin: 0 auto; padding: 22px 16px 56px; }

/* People are told apart by shape, not colour: the applicant is a circle, the respondent a square. */
.token { flex: none; width: 16px; height: 16px; border-radius: 50%; background: var(--ink); }
.token.is-square { width: 15px; height: 15px; border-radius: 3px; }
.token.is-empty { background: none; border: 2px dashed var(--ink); }

/* Buttons */
.btn-big, .btn-ink, .btn-sky, .btn-line {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    border: 2px solid var(--ink);
    border-radius: 999px;
    font-weight: 900;
    text-decoration: none;
    cursor: pointer;
}
.btn-big { height: 60px; margin-top: 26px; background: var(--ink); color: var(--paper); font-size: 19px; letter-spacing: -0.02em; box-shadow: 0 5px 0 rgba(22, 22, 22, 0.28); }
.btn-ink { height: 52px; margin-top: 14px; background: var(--ink); color: var(--paper); font-size: 16px; }
.btn-sky { height: 54px; margin-top: 12px; background: var(--sky); color: var(--ink); font-size: 17px; box-shadow: 0 4px 0 var(--ink); }
.btn-line { height: 52px; margin-top: 14px; background: var(--paper); color: var(--ink); font-size: 16px; }
.btn-small { flex: none; height: 46px; padding: 0 14px; border: var(--line); border-radius: 10px; background: var(--paper); font-size: 14px; font-weight: 900; cursor: pointer; }
.btn-text { justify-self: center; border: 0; background: none; padding: 6px; font-size: 13px; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.btn-big:disabled, .btn-ink:disabled, .btn-sky:disabled { opacity: 0.45; cursor: default; }

.turnstile { margin-top: 16px; display: flex; justify-content: center; }
.turnstile:empty { display: none; }

/* Messages sit on white so they read on the blue floor. */
.status { margin: 14px 0 0; padding: 10px 12px; background: var(--paper); border: var(--line); border-radius: 12px; font-size: 14px; font-weight: 800; line-height: 1.5; text-align: center; }
.status:empty { display: none; }
.fine { margin: 14px 0 0; text-align: center; font-size: 12.5px; font-weight: 800; }
.fine-muted { margin: 10px 0 0; text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); }
.fine-muted.left { text-align: left; }
.toast { margin: 0; text-align: center; font-size: 13px; font-weight: 800; }

/* Cards */
.card { background: var(--paper); border: var(--line); border-radius: 16px; padding: 16px; }
.card-strong { border-width: 2px; box-shadow: 4px 5px 0 var(--ink); padding: 18px 16px; }
.card-locked { background: rgba(255, 255, 255, 0.55); border-style: dashed; }
.card-title { margin: 0 0 12px; font-size: 15px; font-weight: 900; }
.card-head { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 20px; font-weight: 900; letter-spacing: -0.03em; }
.card-head.small { font-size: 15px; }
.card-head .token { width: 14px; height: 14px; }
.card-head .token.is-square { width: 13px; height: 13px; }
.card-text { margin: 6px 0 0; font-size: 14px; line-height: 1.6; color: var(--soft); }
.lock { margin: 10px 0 0; display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 800; color: var(--ink); }
.lock svg { width: 16px; height: 16px; flex: none; }

/* Lobby */
.split { display: grid; gap: 26px; }
.split-right { display: grid; gap: 12px; align-content: start; }
.tag { margin: 0; display: inline-flex; align-items: center; gap: 8px; background: var(--paper); border: var(--line); border-radius: 999px; padding: 3px 12px 3px 3px; font-size: 13px; font-weight: 800; }
.tag span { background: var(--ink); color: var(--paper); border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 900; }
.lobby-title { margin: 14px 0 0; font-size: 62px; font-weight: 900; letter-spacing: -0.055em; line-height: 1.02; }
.lobby-lead { margin: 12px 0 0; font-size: 16px; line-height: 1.6; font-weight: 700; }

.plan { margin-top: 24px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
.bench {
    grid-column: 1 / -1;
    justify-self: center;
    width: 78%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 14px;
    background: var(--paper);
    border: 2px solid var(--ink);
    border-radius: 12px;
    box-shadow: 0 5px 0 var(--ink);
    color: var(--ink);
    font-size: 19px;
    font-weight: 900;
    letter-spacing: -0.03em;
}
.bench svg { width: 48px; height: 32px; }
.seat {
    min-height: 76px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 6px;
    padding: 11px 12px;
    background: var(--paper);
    border: 2px solid var(--ink);
    border-radius: 12px;
    box-shadow: 0 4px 0 var(--ink);
}
.seat.is-empty { background: rgba(255, 255, 255, 0.5); border-style: dashed; box-shadow: none; }
.seat-name { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 900; }
.seat-note { margin: 0; font-size: 13px; font-weight: 800; line-height: 1.45; }
.plan .seat { min-height: 88px; }
.plan .seat-name { font-size: 15px; }
.gallery { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.gallery span { height: 12px; border-radius: 4px; background: rgba(255, 255, 255, 0.6); border: 1.5px solid rgba(22, 22, 22, 0.4); }
.gallery-note { grid-column: 1 / -1; margin: -6px 0 0; text-align: center; font-size: 12px; font-weight: 800; }

/* The charge: one line the applicant writes, printed on the summons. */
.charge-field { margin-top: 26px; }
.charge-field label { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; margin-bottom: 8px; font-size: 15px; font-weight: 900; }
.charge-field label span { font-size: 12.5px; font-weight: 800; }
#charge-input { display: block; width: 100%; height: 54px; padding: 0 14px; border: 2px solid var(--ink); border-radius: 12px; background: var(--paper); color: var(--ink); font: inherit; font-size: 16px; font-weight: 700; }
#charge-input::placeholder { color: #8A8A85; font-weight: 600; }
.charge-field + .turnstile + .btn-big, .charge-field + .btn-big { margin-top: 16px; }
.charge { margin: 12px 0 0; display: inline-flex; align-items: center; gap: 10px; max-width: 100%; background: var(--paper); border: var(--line); border-radius: 12px; padding: 6px 14px 6px 6px; }
.charge b { font-size: 16px; font-weight: 900; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.summons-body .summons-charge { margin: 14px 0 0; display: flex; align-items: baseline; gap: 10px; padding: 10px 12px; background: var(--sky); border: 2px solid var(--ink); border-radius: 10px; color: var(--ink); }
.summons-charge span { flex: none; font-size: 12.5px; font-weight: 900; letter-spacing: 0.2em; }
.summons-charge b { font-size: 19px; font-weight: 900; letter-spacing: -0.03em; line-height: 1.35; overflow-wrap: anywhere; }

.steps { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; font-size: 14.5px; line-height: 1.55; }
.steps li { display: flex; gap: 10px; }
.steps b { flex: none; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--sky); border: var(--line); font-size: 12px; }
.rules { margin: 0; padding: 0; list-style: none; display: grid; gap: 9px; font-size: 14px; line-height: 1.55; }
.rules li { position: relative; padding-left: 18px; }
.rules li::before { content: ''; position: absolute; left: 1px; top: 8px; width: 8px; height: 8px; background: var(--ink); transform: rotate(45deg); }

.mine { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.mine a { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: var(--line); border-radius: 12px; text-decoration: none; }
.mine a.is-open { border-style: dashed; }
.mine small { display: block; font-size: 12px; font-weight: 700; color: var(--muted); }
.mine strong { display: block; font-size: 15.5px; font-weight: 900; }
.mine b { flex: none; font-size: 22px; font-weight: 900; letter-spacing: -0.02em; }
.mine .pill { flex: none; background: var(--sky); border: var(--line); border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 900; }

/* One court */
.chips { margin: 0; display: flex; flex-wrap: wrap; gap: 8px; font-size: 12.5px; font-weight: 900; }
.chip { background: var(--paper); border: var(--line); border-radius: 999px; padding: 3px 12px; }
.chip-ink { background: var(--ink); color: var(--paper); }
.chip:empty { display: none; }
.case-title { margin: 12px 0 0; font-size: 34px; font-weight: 900; letter-spacing: -0.05em; line-height: 1.18; }
.case-grid { margin-top: 16px; display: grid; gap: 18px; }
.case-main { display: grid; gap: 12px; align-content: start; }
.case-actions { display: grid; gap: 12px; align-content: start; }
.case-actions .btn-big, .case-actions .btn-line { margin-top: 0; }

.stage { background: var(--paper); border: 2px solid var(--ink); border-radius: 18px; box-shadow: 0 6px 0 var(--ink); padding: 16px 14px 14px; }
.nameplate { margin: 0 auto; width: max-content; background: var(--ink); color: var(--paper); border-radius: 999px; padding: 4px 14px; font-size: 13px; font-weight: 900; }
.scale { display: block; width: 100%; height: auto; margin-top: 6px; }
.scale text { font: 900 32px var(--sans); fill: var(--ink); }
.scale .weights { display: none; }
.stage.is-judged .scale .weights { display: inline; }
.stage.is-judged .scale .unknown { display: none; }
/* --tilt is set from the server's ratio; the overshoot makes the scale settle like a real one. */
.beam {
    transform-box: view-box;
    transform-origin: 170px 82px;
    transform: rotate(var(--tilt, 0deg));
    transition: transform 1.1s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.stage.is-waiting .beam { animation: wobble 2.4s ease-in-out infinite; }
@keyframes wobble {
    0%, 100% { transform: rotate(-2.5deg); }
    50% { transform: rotate(2.5deg); }
}

.ratio { margin-top: 4px; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; text-align: center; }
.ratio p { margin: 0; }
.ratio-no { font-size: 104px; font-weight: 900; line-height: 1; letter-spacing: -0.04em; }
.ratio-colon { margin: 0 0 34px !important; font-size: 60px; font-weight: 900; line-height: 1; }
.ratio-who { margin-top: 6px !important; display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 900; }
.ratio-who .token { width: 13px; height: 13px; }
.ratio-who .token.is-square { width: 12px; height: 12px; border-radius: 2px; }
.ratio.is-reveal .ratio-no { animation: rise 0.6s 0.5s ease-out both; }
@keyframes rise {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
}

.seats { margin-top: 12px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.stage .seat { min-height: 0; padding: 10px 12px; border-width: 1.5px; box-shadow: none; }
.stage .seat.is-empty { background: none; }
.stage .seat-name { font-size: 13.5px; }
.stage .seat .token { width: 15px; height: 15px; }
.stage .seat .token.is-square { width: 14px; height: 14px; }
.stage.is-judged .seats { display: none; }
.done { display: inline-flex; align-items: center; gap: 5px; background: var(--sky); border: var(--line); border-radius: 999px; padding: 1px 9px 1px 7px; font-size: 12px; font-weight: 900; }
.done svg { width: 12px; height: 12px; }

.summons { background: var(--paper); border: 2px solid var(--ink); border-radius: 16px; box-shadow: 5px 6px 0 var(--ink); overflow: hidden; }
.summons-head { margin: 0; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 16px; background: var(--ink); color: var(--paper); font-size: 13px; font-weight: 900; }
.summons-head span:first-child { letter-spacing: 0.3em; }
.summons-body { padding: 20px 16px 2px; }
.summons-body h2 { margin: 0; font-size: 26px; font-weight: 900; letter-spacing: -0.045em; line-height: 1.25; }
.summons-body p { margin: 10px 0 0; font-size: 15px; line-height: 1.65; color: var(--soft); }
.summons-body .lock { color: var(--ink); font-size: 13px; }
.summons-foot { padding: 0 16px 18px; }
.summons-foot .btn-big { margin-top: 20px; }

.link-row { margin-top: 14px; display: flex; gap: 8px; }
.link-box { margin: 0; flex: 1; min-width: 0; height: 46px; padding: 0 12px; border: var(--line); border-radius: 10px; background: #F3F6FA; font-size: 13px; font-weight: 700; line-height: 43px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.write-label { display: block; margin: 12px 0 6px; font-size: 14px; font-weight: 800; }
#statement { display: block; width: 100%; min-height: 150px; padding: 12px; border: 2px solid var(--ink); border-radius: 12px; background: var(--paper); color: var(--ink); font: inherit; font-size: 15px; line-height: 1.65; resize: vertical; }
#statement::placeholder { color: #8A8A85; }
.write-meta { margin: 8px 0 0; display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.write-meta b { color: var(--ink); font-weight: 900; }

.wait-title { margin: 0; font-size: 19px; font-weight: 900; letter-spacing: -0.03em; line-height: 1.4; }
.said { margin: 6px 0 0; font-size: 14.5px; line-height: 1.65; overflow-wrap: anywhere; }
#mine-text { margin-top: 10px; padding: 12px; background: #F3F6FA; border-radius: 10px; }

/* Verdict */
.verdict { display: grid; gap: 12px; }
.verdict p { margin: 0; }
.label { display: inline-block; background: var(--ink); color: var(--paper); border-radius: 6px; padding: 2px 10px; font-size: 12.5px; font-weight: 900; letter-spacing: 0.2em; }
.verdict .order { margin-top: 10px; font-size: 17px; font-weight: 900; line-height: 1.5; letter-spacing: -0.02em; }
.dash { margin: 14px 0; border: 0; border-top: 1.5px dashed var(--ink); }
.verdict .reason { margin-top: 10px; font-size: 15.5px; font-weight: 600; line-height: 1.75; }
.verdict .fine-muted { margin-top: 14px; }

.table { margin-top: 12px; display: grid; grid-template-columns: minmax(0, 1fr) 78px 78px; row-gap: 10px; align-items: center; font-size: 14px; }
.table .head { display: flex; justify-content: center; align-items: center; gap: 5px; font-size: 12px; font-weight: 900; }
.table .head .token { width: 11px; height: 11px; }
.table .head .token.is-square { width: 10px; height: 10px; border-radius: 2px; }
.table .item { font-weight: 800; }
.pips { display: flex; justify-content: center; gap: 4px; }
.pip { width: 14px; height: 14px; border: 2px solid var(--ink); border-radius: 50%; }
.pip.is-square { border-radius: 3px; }
.pip.is-full { background: var(--ink); }
.pip.is-half { background: linear-gradient(90deg, var(--ink) 50%, var(--paper) 50%); }
.verdict .contempt { margin-top: 12px; padding: 8px 10px; border: 1.5px dashed var(--ink); border-radius: 10px; font-size: 13px; font-weight: 800; }
.verdict .points { margin-top: 14px; padding-top: 12px; border-top: var(--line); display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; font-weight: 900; }
.verdict .points + .fine-muted { margin-top: 8px; }

.notes { display: grid; gap: 10px; }
.note-to { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 900; }
.note-to .token { width: 12px; height: 12px; }
.note-to .token.is-square { width: 11px; height: 11px; border-radius: 2px; }
.verdict .note { margin-top: 6px; font-size: 15px; font-weight: 700; line-height: 1.6; }
.said-both { display: grid; gap: 10px; }
.verdict .said-title { margin-top: 10px; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 16px; font-weight: 900; }
.said-title span { font-size: 12px; font-weight: 800; }

@media (min-width: 980px) {
    .court { max-width: 1104px; padding: 36px 16px 64px; }
    .split { grid-template-columns: minmax(0, 1fr) minmax(0, 430px); column-gap: 40px; align-items: start; }
    .lobby-title { font-size: 84px; }
    .lobby-lead { font-size: 18px; }
    .case-title { font-size: 48px; }
    .charge b { font-size: 18px; }
    .case-grid {
        margin-top: 24px;
        grid-template-columns: minmax(0, 440px) minmax(0, 1fr);
        grid-template-areas: "stage main" "actions main";
        grid-template-rows: auto 1fr;
        column-gap: 24px;
        row-gap: 14px;
        align-items: start;
    }
    .stage { grid-area: stage; padding: 22px 22px 26px; }
    .case-main { grid-area: main; }
    .case-actions { grid-area: actions; }
    .ratio-no { font-size: 136px; }
    .ratio-colon { margin-bottom: 44px !important; font-size: 76px; }
    .ratio-who { font-size: 16px; }
    .verdict .order { font-size: 21px; }
    .verdict .reason { font-size: 17px; }
    .notes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .br-narrow { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .beam { transition: none; }
    .stage.is-waiting .beam { animation: none; }
    .ratio.is-reveal .ratio-no { animation: none; }
}
