/* === Swiss International Typographic Style === */

/* === Design Tokens === */
:root {
    --bg: #FFFFFF;
    --fg: #000000;
    --muted: #F2F2F2;
    --accent: #FF3000;
    --border: #000000;
    --font: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

/* === Reset & Base === */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--fg);
    padding: 24px;
    min-height: 100vh;
    position: relative;
}

/* Noise texture overlay */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.015;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}

/* Grid pattern texture */
.swiss-grid {
    background-image:
        linear-gradient(rgba(0,0,0,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,0,0,0.03) 1px, transparent 1px);
    background-size: 24px 24px;
}

.container {
    max-width: 520px;
    margin: 0 auto;
}

/* === Section Label (01. CONSENT, 02. ANNOTATE, etc.) === */
.section-label {
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: 20px;
}

.annotate-question-label {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 0.95rem;
    line-height: 1.45;
    letter-spacing: 0;
    text-transform: none;
}

.annotate-question-label span {
    white-space: nowrap;
}

.submit-error-toast {
    position: fixed;
    top: 18px;
    left: 50%;
    z-index: 1200;
    width: min(calc(100vw - 32px), 360px);
    padding: 12px 16px;
    border: 2px solid var(--black);
    background: var(--paper);
    color: var(--black);
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
    box-shadow: 4px 4px 0 var(--black);
    transform: translate(-50%, -8px);
    opacity: 0;
    transition: opacity 0.16s ease-out, transform 0.16s ease-out;
}

.submit-error-toast.visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* === Consent Page === */
.consent-page {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: calc(100vh - 48px);
    background-image:
        linear-gradient(rgba(0,0,0,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,0,0,0.03) 1px, transparent 1px);
    background-size: 24px 24px;
    padding: 40px 0;
}

.consent-title {
    font-size: clamp(2.5rem, 10vw, 5rem);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.03em;
    line-height: 0.95;
    margin-bottom: 28px;
    color: var(--fg);
}

.consent-subtitle {
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.8;
    color: var(--fg);
    opacity: 0.6;
    margin-bottom: 40px;
    max-width: 400px;
}

.consent-check-label {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--fg);
    padding: 16px;
    border: 2px solid var(--border);
    transition: border-color 0.15s ease-out;
    user-select: none;
}

.consent-check-label:hover {
    border-color: var(--accent);
}

.consent-check-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--fg);
    flex-shrink: 0;
}

.btn-start {
    display: inline-block;
    background: var(--fg);
    color: var(--bg);
    border: 2px solid var(--fg);
    padding: 16px 48px;
    font-size: 0.9rem;
    font-weight: 700;
    font-family: var(--font);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    cursor: pointer;
    transition: background 0.15s ease-out, color 0.15s ease-out, border-color 0.15s ease-out;
}

.btn-start:hover:not(:disabled) {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg);
}

.btn-start:disabled {
    background: var(--muted);
    border-color: var(--muted);
    color: #999;
    cursor: not-allowed;
}

.btn-start:not(:disabled):active {
    transform: scale(0.98);
}

/* === Annotate Page === */
.annotate-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
    box-sizing: border-box;
    padding-top: 15vh;
    padding-bottom: 10vh;
}

.annotate-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    column-gap: 20px;
    row-gap: 8px;
    align-items: start;
    margin-bottom: 16px;
}

.annotate-top .annotate-question-label {
    grid-column: 1;
    grid-row: 1 / span 2;
    margin-bottom: 0;
}

.annotate-page > .progress-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    order: 20;
    gap: 6px 10px;
    color: var(--fg);
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 28px;
    margin-bottom: 0;
}

.queue-progress-note {
    color: #777;
    font-size: 0.74rem;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
}

.queue-reward-note {
    flex-basis: 100%;
    color: #666;
    font-size: 0.74rem;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
}

.queue-progress-track {
    position: relative;
    width: min(260px, 100%);
    height: 6px;
    background: #e8e8e8;
    border: 1px solid #d0d0d0;
    overflow: hidden;
}

.queue-progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    transition: width 0.25s ease-out, left 0.25s ease-out;
}

.queue-progress-fill--answered {
    background: #111;
}

.queue-progress-fill--skipped {
    background: #c0392b;
}

.progress-bar-right {
    margin-left: auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.vpn-hint {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    align-self: start;
    color: #666;
    font-size: 0.74rem;
    font-weight: 400;
    line-height: 1.2;
    text-transform: none;
    letter-spacing: 0;
    white-space: nowrap;
}

.progress-action-row {
    display: flex;
    align-items: center;
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
    align-self: start;
    gap: 10px;
}

.btn-bpe-demo {
    background: var(--bg);
    color: var(--fg);
    border: 1.5px solid var(--fg);
    padding: 5px 12px;
    font-size: 0.7rem;
    font-weight: 600;
    font-family: var(--font);
    letter-spacing: 0.05em;
    cursor: pointer;
    text-transform: none;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.btn-bpe-demo:hover {
    background: var(--fg);
    color: var(--bg);
}

.btn-bpe-demo:active {
    transform: scale(0.97);
}

.count-num {
    font-weight: 900;
    color: var(--fg);
    font-size: 1.2rem;
    margin: 0 2px;
}

.count-total {
    font-weight: 700;
    color: #999;
    font-size: 0.95rem;
}

.annotation-main-card {
    position: relative;
    overflow: hidden;
    margin-bottom: 14px;
    background: var(--bg);
    border: 4px solid var(--border);
}

/* Dot pattern across the unified annotation card */
.annotation-main-card::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: radial-gradient(circle, rgba(0,0,0,0.035) 1px, transparent 1px);
    background-size: 16px 16px;
}

.token-display {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    padding: 40px 20px 34px;
    margin-bottom: 0;
    background: transparent;
    border-bottom: 3px solid var(--border);
    min-height: 132px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.token-display-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 1;
}

#token-text {
    display: block;
    max-width: 100%;
    line-height: 1.12;
    white-space: nowrap;
}

#token-text.token-long {
    font-size: 1.75rem;
}

.token-meta {
    font-size: 0.75rem;
    font-weight: 500;
    color: #999;
    letter-spacing: 0.02em;
}

.token-display.fade-in {
    animation: fadeIn 0.2s ease-out;
}

.annotation-guide {
    border: 0;
    background: transparent;
    color: #555;
    font-size: 0.82rem;
    font-weight: 400;
    line-height: 1.6;
    margin: 0 0 16px;
    padding: 0 4px;
    text-align: left;
}

.annotation-guide-line {
    display: block;
}

.annotation-guide strong {
    color: var(--fg);
    font-weight: 800;
}

.annotation-guide-line + .annotation-guide-line {
    margin-top: 2px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* === Card Grid === */
.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.sub-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

/* === Choice Card === */
.choice-card {
    background: var(--bg);
    border: 2px solid var(--border);
    padding: 14px 14px 12px;
    cursor: pointer;
    transition: background 0.15s ease-out, color 0.15s ease-out, border-color 0.15s ease-out;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.choice-card:hover {
    border-color: var(--accent);
}

.choice-card:active {
    transform: scale(0.97);
}

/* Selected: full color inversion */
.choice-card.selected {
    background: var(--fg);
    border-color: var(--fg);
    color: var(--bg);
}

.choice-card.selected .card-icon {
    color: var(--bg);
}

.choice-card.selected .card-label {
    color: var(--bg);
}

.choice-card.disabled {
    opacity: 0.3;
    pointer-events: none;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.card-icon {
    width: 22px;
    height: 22px;
    color: var(--fg);
    flex-shrink: 0;
}

/* Radio indicator — square for Swiss style */
.radio-dot {
    width: 14px;
    height: 14px;
    border: 2px solid var(--border);
    flex-shrink: 0;
    position: relative;
    transition: border-color 0.15s ease-out, background 0.15s ease-out;
}

.choice-card.selected .radio-dot {
    border-color: var(--bg);
    background: var(--bg);
}

.choice-card.selected .radio-dot::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    background: var(--fg);
}

.card-label {
    display: block;
    text-align: left;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--fg);
    letter-spacing: 0.02em;
}

/* === Tooltip === */
.tooltip-wrap {
    position: relative;
}

.tooltip {
    display: none;
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--fg);
    color: var(--bg);
    padding: 14px 16px;
    font-size: 0.8rem;
    font-weight: 400;
    line-height: 1.7;
    width: 280px;
    text-align: left;
    border: 2px solid var(--fg);
    z-index: 10;
    pointer-events: none;
}

.tooltip em {
    color: var(--accent);
    font-style: normal;
}

/* No arrow — Swiss style direct positioning */

.tooltip-wrap:hover .tooltip {
    display: block;
}

/* === Step 2 Header === */
.step2-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.step2-label {
    font-size: 0.85rem;
    color: var(--fg);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.back-btn {
    background: none;
    border: 2px solid var(--border);
    padding: 6px 14px;
    font-size: 0.8rem;
    font-weight: 700;
    font-family: var(--font);
    cursor: pointer;
    color: var(--fg);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: background 0.15s ease-out, color 0.15s ease-out, border-color 0.15s ease-out;
}

.back-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg);
}

/* === Reason Section === */
.reason-section {
    margin-bottom: 16px;
}

.reason-section summary {
    cursor: pointer;
    color: var(--fg);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 0;
}

.reason-section textarea {
    width: 100%;
    padding: 12px 0;
    border: none;
    border-bottom: 2px solid var(--border);
    font-size: 0.9rem;
    margin-top: 8px;
    resize: vertical;
    font-family: var(--font);
    background: transparent;
    color: var(--fg);
    outline: none;
    transition: border-color 0.15s ease-out;
}

.reason-section textarea:focus {
    border-bottom-color: var(--accent);
}

/* === Complete Message === */
.complete-msg {
    text-align: left;
    padding: 60px 0;
}

.complete-msg h2 {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 12px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

.complete-msg p {
    color: var(--fg);
    opacity: 0.6;
    font-size: 1rem;
}

/* === Summary Page === */
.summary-page {
    padding-top: 12px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.summary-action-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.summary-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--fg);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 8px 16px;
    border: 2px solid var(--border);
    margin-bottom: 0;
    transition: background 0.15s ease-out, color 0.15s ease-out, border-color 0.15s ease-out;
}

.summary-makeup-progress {
    color: #666;
    font-size: 0.82rem;
    font-weight: 400;
    line-height: 1.4;
}

.summary-back:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg);
}

.summary-back.summary-back-completed {
    pointer-events: none;
    cursor: default;
    background: var(--muted);
    border-color: var(--border);
    color: #666;
}

.summary-back.summary-back-completed:hover {
    background: var(--muted);
    border-color: var(--border);
    color: #666;
}

.summary-card {
    background: var(--bg);
    border: 4px solid var(--border);
    padding: 28px 24px 24px;
    width: 100%;
    max-width: 520px;
    position: relative;
    align-self: center;
}

.summary-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.summary-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--fg);
    letter-spacing: 0;
    margin-bottom: 4px;
}

.summary-subtitle {
    color: #777;
    font-size: 0.78rem;
    line-height: 1.5;
}

.summary-icon {
    width: 36px;
    height: 36px;
    background: var(--fg);
    color: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.summary-icon svg {
    width: 18px;
    height: 18px;
}

.summary-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 18px;
}

.summary-metric {
    border: 2px solid var(--border);
    padding: 10px 8px;
    min-width: 0;
}

.summary-metric-value {
    display: block;
    color: var(--fg);
    font-size: 1.35rem;
    font-weight: 900;
    line-height: 1;
}

.summary-metric-label {
    display: block;
    color: #777;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    margin-top: 5px;
    text-transform: uppercase;
}

.summary-metric-agree {
    border-color: var(--accent);
}

.summary-metric-disagree {
    background: #f4f4f4;
}

.completion-feedback {
    border-top: 3px solid var(--border);
    border-bottom: 3px solid var(--border);
    padding: 18px 0 20px;
    margin: 0 0 18px;
}

.feedback-kicker {
    color: var(--accent);
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.18em;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.feedback-title {
    color: var(--fg);
    font-size: 1rem;
    font-weight: 900;
    line-height: 1.25;
    margin: 0 0 8px;
}

.feedback-takeaway {
    color: var(--fg);
    font-size: 0.9rem;
    font-weight: 900;
    line-height: 1.7;
    margin: 0 0 16px;
}

.feedback-ratio {
    margin-bottom: 14px;
}

.feedback-peer-match {
    margin-bottom: 14px;
}

.feedback-ratio-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #666;
    font-size: 0.72rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.feedback-ratio-head strong {
    color: var(--fg);
    font-size: 0.86rem;
}

.feedback-ratio-track {
    height: 12px;
    border: 2px solid var(--border);
    background: #111;
    overflow: hidden;
}

.feedback-ratio-agree {
    width: 0%;
    height: 100%;
    background: var(--accent);
    transition: width 0.24s ease-out;
}

.feedback-peer-match-bar {
    background: var(--accent);
}

.feedback-peer-note {
    color: #777;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.5;
    margin: 7px 0 0;
}

.feedback-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-top: 1px solid #e5e5e5;
    padding-top: 12px;
    color: #666;
    font-size: 0.76rem;
    font-weight: 800;
}

.feedback-meta-row strong {
    color: var(--fg);
}

.feedback-meta-row span {
    color: var(--fg);
    font-weight: 900;
}

.feedback-source-block {
    margin-top: 12px;
}

.feedback-source-title {
    color: var(--fg);
    font-size: 0.78rem;
    font-weight: 900;
    margin-bottom: 8px;
}

.feedback-source-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.feedback-source-row,
.feedback-source-empty {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 32px;
    border: 2px solid var(--border);
    padding: 6px 10px;
    color: var(--fg);
    font-size: 0.76rem;
    font-weight: 800;
}

.feedback-source-row strong {
    color: var(--accent);
    white-space: nowrap;
}

.feedback-source-empty {
    justify-content: center;
    color: #777;
    border-color: #ddd;
    font-weight: 700;
}

.annotation-list {
    border: 3px solid var(--border);
    max-height: 52vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.annotation-empty {
    color: #777;
    font-size: 0.9rem;
    padding: 28px 16px;
    text-align: center;
}

.annotation-item {
    width: 100%;
    min-height: 62px;
    border: 0;
    border-bottom: 1px solid #e5e5e5;
    background: var(--bg);
    color: var(--fg);
    cursor: pointer;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 12px 14px;
    text-align: left;
    font-family: var(--font);
    -webkit-appearance: none;
    appearance: none;
}

.annotation-item:last-child {
    border-bottom: 0;
}

.annotation-item:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -4px;
}

.annotation-item.choice-agree {
    border-left: 6px solid var(--accent);
}

.annotation-item.choice-disagree {
    border-left: 6px solid #000;
    background: #f4f4f4;
}

.annotation-item.choice-skipped {
    border-left: 6px solid #9b9b9b;
    background: #fafafa;
}

.annotation-order {
    color: #999;
    font-size: 0.78rem;
    font-weight: 900;
    text-align: center;
}

.annotation-main {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.annotation-token {
    color: var(--fg);
    font-size: 1rem;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.annotation-meta {
    color: #777;
    font-size: 0.72rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.annotation-choice {
    border: 2px solid var(--border);
    color: var(--fg);
    font-size: 0.72rem;
    font-weight: 900;
    padding: 5px 9px;
    white-space: nowrap;
}

.choice-agree .annotation-choice {
    border-color: var(--accent);
}

.choice-disagree .annotation-choice {
    border-color: #000;
    background: #000;
    color: #fff;
}

.choice-skipped .annotation-choice {
    border-color: #9b9b9b;
    background: #e9e9e9;
    color: #333;
}

.summary-hint {
    color: #777;
    font-size: 0.76rem;
    line-height: 1.6;
    margin-top: 12px;
}

.edit-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.35);
    padding: 18px;
}

.edit-panel {
    background: var(--bg);
    border: 4px solid var(--border);
    box-shadow: 0 16px 44px rgba(0, 0, 0, 0.18);
    max-height: calc(100vh - 36px);
    max-width: 460px;
    overflow-y: auto;
    padding: 22px;
    width: 100%;
}

.edit-panel-header {
    align-items: flex-start;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin-bottom: 16px;
}

.edit-title {
    color: var(--fg);
    font-size: 1rem;
    font-weight: 900;
    margin-bottom: 6px;
}

.edit-token {
    color: var(--fg);
    font-size: 1.35rem;
    font-weight: 900;
    line-height: 1.25;
    word-break: break-word;
}

.edit-close {
    align-items: center;
    background: var(--fg);
    border: 2px solid var(--fg);
    color: var(--bg);
    cursor: pointer;
    display: flex;
    flex-shrink: 0;
    font-family: var(--font);
    font-size: 1.2rem;
    font-weight: 900;
    height: 34px;
    justify-content: center;
    line-height: 1;
    width: 34px;
}

.edit-meta {
    border: 2px solid var(--border);
    margin-bottom: 16px;
    padding: 12px 14px;
}

.edit-meta-row {
    align-items: baseline;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: #777;
    font-size: 0.78rem;
    line-height: 1.6;
}

.edit-meta-row strong {
    color: var(--fg);
    text-align: right;
}

.edit-reason {
    border-top: 1px solid #e7e7e7;
    color: #666;
    font-size: 0.8rem;
    line-height: 1.6;
    margin-top: 8px;
    padding-top: 8px;
}

.edit-choice-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
}

.edit-choice {
    background: var(--bg);
    border: 3px solid var(--border);
    color: var(--fg);
    cursor: pointer;
    font-family: var(--font);
    font-size: 0.92rem;
    font-weight: 900;
    padding: 13px 8px;
    -webkit-appearance: none;
    appearance: none;
}

.edit-choice.selected {
    background: var(--fg);
    border-color: var(--fg);
    color: var(--bg);
}

#edit-agree.selected {
    background: var(--accent);
    border-color: var(--accent);
}

.edit-feedback-fields {
    border-top: 2px solid var(--border);
    padding-top: 14px;
}

.edit-error {
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 700;
    margin-top: 10px;
}

.edit-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 16px;
}

@media (max-width: 640px) {
    .annotate-top {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-rows: auto;
        column-gap: 10px;
        row-gap: 8px;
    }

    .annotate-top .annotate-question-label {
        grid-column: 1;
        grid-row: 1 / span 2;
        justify-self: start;
        font-size: 0.76rem;
        line-height: 1.35;
    }

    .vpn-hint {
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
        align-self: start;
        font-size: 0.66rem;
        white-space: nowrap;
    }

    .progress-action-row {
        grid-column: 2;
        grid-row: 2;
        justify-self: end;
        align-self: start;
    }

    .summary-link {
        height: 30px;
        padding: 0 8px;
    }

    .summary-link svg {
        width: 15px;
        height: 15px;
    }

    .summary-link-text {
        font-size: 0.66rem;
    }

    .annotate-page > .progress-bar {
        margin-top: 28px;
        margin-bottom: 0;
    }

    .annotation-main-card {
        margin-bottom: 12px;
    }

    .token-display {
        min-height: 136px;
        padding: 36px 14px 30px;
    }

    .label-display {
        padding: 15px 16px 17px;
    }

    .label-row {
        gap: 6px;
    }

    .label-row + .label-row {
        margin-top: 7px;
    }

    .label-field {
        font-size: 0.72rem;
    }

    .label-value {
        font-size: 0.86rem;
        line-height: 1.65;
    }

    .label-value--bold {
        font-size: 0.92rem;
    }

    .annotation-main-card .info-card {
        padding: 14px 16px 16px;
    }

    .annotation-guide {
        font-size: 0.8rem;
        line-height: 1.45;
        margin-bottom: 12px;
        padding: 0 2px;
    }

    .annotation-guide-line + .annotation-guide-line {
        margin-top: 1px;
    }

    .queue-nav-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        margin: 8px 0 16px;
    }

    .queue-nav-btn {
        padding: 10px 8px;
        font-size: 0.78rem;
        white-space: nowrap;
    }

    .summary-card {
        max-width: none;
        padding: 22px 16px 18px;
    }

    .summary-metrics {
        grid-template-columns: repeat(2, 1fr);
    }

    .annotation-list {
        max-height: 56vh;
    }

    .edit-overlay {
        align-items: flex-end;
        padding: 0;
    }

    .edit-panel {
        border-bottom: 0;
        border-left: 0;
        border-radius: 0;
        border-right: 0;
        max-height: 88vh;
        max-width: none;
        padding: 20px 18px calc(20px + env(safe-area-inset-bottom));
    }

    .edit-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
}

/* Summary link on annotate page */
.summary-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: auto;
    min-width: 32px;
    height: 32px;
    border: 2px solid var(--border);
    background: var(--bg);
    color: var(--fg);
    padding: 0 9px;
    cursor: pointer;
    transition: background 0.15s ease-out, color 0.15s ease-out, border-color 0.15s ease-out;
    text-decoration: none;
    vertical-align: middle;
}

.summary-link:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg);
}

.summary-link svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.summary-link-text {
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

/* === Reward Modal === */
.reward-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.reward-modal {
    background: var(--bg);
    border: 2px solid var(--fg);
    border-radius: 16px;
    padding: 36px 32px;
    max-width: 400px;
    width: 100%;
    text-align: center;
}

.reward-badge {
    font-size: 48px;
    margin-bottom: 12px;
}

.reward-title {
    font-size: 1.3rem;
    font-weight: 800;
    margin: 0 0 12px;
    color: var(--fg);
}

.reward-desc {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #555;
    margin: 0 0 20px;
}

.reward-desc strong {
    color: var(--accent);
    font-weight: 700;
}

.skipped-review-modal {
    border-radius: 8px;
}

.reward-input {
    width: 100%;
    padding: 14px 16px;
    font-size: 1rem;
    border: 2px solid var(--fg);
    border-radius: 10px;
    outline: none;
    text-align: center;
    letter-spacing: 2px;
    font-family: inherit;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}

.reward-input:focus {
    border-color: var(--accent);
}

.reward-error {
    color: var(--accent);
    font-size: 0.8rem;
    margin: 8px 0 0;
}

.reward-btn {
    display: block;
    width: 100%;
    margin-top: 16px;
    padding: 14px;
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    color: var(--bg);
    background: var(--fg);
    border: 2px solid var(--fg);
    border-radius: 10px;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.reward-btn:active {
    background: var(--accent);
    border-color: var(--accent);
}

/* === SMS Verification Code === */
.sms-phone-row {
    width: 100%;
}

.sms-code-step {
    width: 100%;
}

.sms-phone-disabled {
    background: #F5F5F5;
    color: #999;
    border-color: #DDD;
}

.sms-code-row {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    width: 100%;
}

.sms-code-input {
    flex: 1;
    min-width: 0;
    font-size: 1.2rem;
    letter-spacing: 6px;
    padding: 14px 12px;
}

.sms-resend-btn {
    flex-shrink: 0;
    width: 100px;
    padding: 14px 8px;
    font-size: 0.85rem;
    font-weight: 700;
    font-family: inherit;
    color: var(--fg);
    background: var(--bg);
    border: 2px solid var(--fg);
    border-radius: 10px;
    cursor: pointer;
    white-space: nowrap;
    -webkit-appearance: none;
    appearance: none;
}

.sms-resend-btn:disabled {
    color: #999;
    border-color: #DDD;
    cursor: default;
}

.sms-resend-btn:not(:disabled):active {
    background: var(--fg);
    color: var(--bg);
}

/* === Detail Info FAB & Overlay === */
.detail-fab {
    position: fixed;
    bottom: 24px;
    bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    right: 24px;
    z-index: 100;
    display: -webkit-flex;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border: 2px solid var(--border);
    border-radius: 999px;
    background: var(--bg);
    color: var(--fg);
    font-size: 0.8rem;
    font-weight: 700;
    font-family: var(--font);
    letter-spacing: 0.03em;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.detail-fab svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.detail-fab:hover {
    background: var(--fg);
    border-color: var(--fg);
    color: var(--bg);
    box-shadow: 0 4px 14px rgba(0,0,0,0.12);
}

.detail-fab:hover svg {
    stroke: var(--bg);
}

.detail-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    background: var(--bg);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.detail-overlay[style*="display: none"],
.detail-overlay[style*="display:none"] {
    visibility: hidden;
}

.detail-header {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--bg);
    padding: 16px 24px;
    border-bottom: 2px solid var(--border);
}

.detail-back {
    background: none;
    border: 2px solid var(--border);
    padding: 8px 20px;
    font-size: 0.8rem;
    font-weight: 700;
    font-family: var(--font);
    letter-spacing: 0.05em;
    cursor: pointer;
    color: var(--fg);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.detail-back:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg);
}

.detail-overlay .narrative {
    margin-top: 0;
    padding: 20px 24px 60px;
    padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px));
}

@media (max-width: 480px) {
    .detail-fab {
        bottom: 16px;
        bottom: calc(16px + env(safe-area-inset-bottom, 0px));
        right: 16px;
        padding: 8px 14px;
        font-size: 0.75rem;
    }

    .detail-fab svg {
        width: 14px;
        height: 14px;
    }

    .detail-header {
        padding: 12px 16px;
    }

    .detail-back {
        padding: 10px 20px;
        font-size: 0.85rem;
    }
}

/* === BPE Transition Overlay === */
.bpe-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bpe-skip {
    position: absolute;
    top: 24px;
    right: 24px;
    background: none;
    border: 2px solid var(--border);
    padding: 8px 20px;
    font-size: 0.8rem;
    font-weight: 700;
    font-family: var(--font);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    color: var(--fg);
    z-index: 10001;
    transition: background 0.15s ease-out, color 0.15s ease-out, border-color 0.15s ease-out;
}

.bpe-skip:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg);
}

.bpe-stage {
    max-width: 560px;
    width: 100%;
    padding: 24px;
    text-align: left;
}

.bpe-step-label {
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: 32px;
}

.bpe-arena {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    min-height: 80px;
    margin-bottom: 24px;
}

.bpe-token {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--border);
    padding: 12px 16px;
    font-size: 1.4rem;
    font-weight: 700;
    font-family: var(--font);
    background: var(--bg);
    color: var(--fg);
    transition: all 0.3s ease-out;
    white-space: nowrap;
}

.bpe-token.highlight {
    border-color: var(--accent);
    box-shadow: inset 0 -3px 0 var(--accent);
}

.bpe-token.merged {
    border-width: 4px;
    border-color: var(--accent);
}

.bpe-token.merged-done {
    border-width: 2px;
    border-color: var(--border);
}

.bpe-counter {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--fg);
    opacity: 0.7;
    margin-top: 8px;
    margin-bottom: 8px;
}

.bpe-counter em {
    color: var(--accent);
    font-style: normal;
    font-weight: 700;
}

.bpe-caption {
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--fg);
    opacity: 0.5;
    line-height: 1.6;
}

.bpe-final-text {
    font-size: clamp(1.5rem, 5vw, 2.5rem);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: var(--fg);
    opacity: 0;
    transition: opacity 0.5s ease-out;
}

.bpe-final-text.visible {
    opacity: 1;
}

/* Mock Webpage */
.mock-page {
    border: 2px solid var(--border);
    background: var(--bg);
    width: 100%;
    max-width: 480px;
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.mock-page.mock-page-fade {
    opacity: 0;
    transform: scale(0.92);
}

.mock-titlebar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 12px;
    border-bottom: 2px solid var(--border);
    background: var(--muted);
}

.mock-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.mock-dot-red { background: #FF5F57; }
.mock-dot-yellow { background: #FEBC2E; }
.mock-dot-green { background: #28C840; }

.mock-url {
    margin-left: 10px;
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--fg);
    opacity: 0.4;
    letter-spacing: 0.02em;
}

.mock-content {
    padding: 16px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mock-line {
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--fg);
}

.mock-placeholder {
    opacity: 0.15;
    letter-spacing: 0.1em;
}

.mock-target {
    font-weight: 700;
    color: var(--fg);
    position: relative;
    transition: color 0.3s ease-out, transform 0.6s ease-out;
    display: inline-block;
}

.mock-target-highlight {
    color: var(--accent);
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.mock-target-zoom {
    transform: scale(1.6);
    z-index: 10;
}

@media (max-width: 480px) {
    .bpe-token {
        padding: 8px 10px;
        font-size: 1.1rem;
    }

    .bpe-stage {
        padding: 16px;
    }

    .mock-page {
        max-width: 100%;
    }

    .mock-content {
        padding: 12px 10px;
    }
}

/* === Hero Animation === */
.hero-anim {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    padding: 24px;
}

.hero-stage {
    text-align: center;
    width: 100%;
    max-width: 520px;
}

/* Phase 1: Token flash */
.hero-flash {
    font-size: clamp(1.4rem, 5vw, 2.8rem);
    font-weight: 900;
    color: var(--fg);
    opacity: 0;
    line-height: 1.2;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.hero-flash.slam {
    animation: hero-slam 0.2s ease-out forwards;
}

@keyframes hero-slam {
    0%   { opacity: 0; transform: scale(2); }
    50%  { opacity: 1; transform: scale(0.96); }
    100% { opacity: 1; transform: scale(1); }
}

/* Tagline */
.hero-tagline {
    font-size: clamp(1.2rem, 4vw, 2rem);
    font-weight: 900;
    color: var(--fg);
    opacity: 0;
    transition: opacity 0.4s ease-out;
    letter-spacing: -0.01em;
}

.hero-tagline.visible {
    opacity: 1;
}

.hero-tagline .accent {
    color: var(--accent);
}

/* Phase 2: Evidence-card annotation demo */
.hero-evidence {
    --hero-guide-color: #8a3d34;
    text-align: left;
    width: min(520px, calc(100vw - 32px));
    margin: 0 auto;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

.hero-evidence.visible {
    opacity: 1;
    transform: translateY(0);
}

.hero-evidence-card {
    position: relative;
    overflow: hidden;
    background: var(--bg);
    border: 4px solid var(--fg);
}

.hero-evidence-card::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: radial-gradient(circle, rgba(0,0,0,0.04) 1px, transparent 1px);
    background-size: 16px 16px;
}

.hero-evidence-row {
    position: relative;
    z-index: 1;
    min-height: 92px;
    padding: 16px 18px;
    border-bottom: 3px solid var(--fg);
}

.hero-evidence-row:last-child {
    min-height: 124px;
    border-bottom: 0;
}

.hero-evidence-kicker,
.hero-evidence-prompt {
    display: block;
    color: var(--hero-guide-color);
    font-weight: 800;
}

.hero-evidence-kicker {
    min-height: 1.2em;
    margin-bottom: 6px;
    font-size: 0.78rem;
    line-height: 1.35;
}

.hero-evidence-value,
.hero-evidence-reason {
    color: var(--fg);
    font-weight: 800;
}

.hero-evidence-value {
    min-height: 1.25em;
    font-size: clamp(1.45rem, 5vw, 2rem);
    line-height: 1.18;
    letter-spacing: 0;
}

.hero-evidence-reason {
    min-height: 4.8em;
    font-size: 0.95rem;
    line-height: 1.6;
}

.hero-evidence-prompt {
    min-height: 3em;
    margin: 18px 0 0;
    font-size: 1.04rem;
    line-height: 1.5;
}

.hero-evidence .is-typing::after {
    content: '';
    display: inline-block;
    width: 2px;
    height: 1em;
    margin-left: 3px;
    background: #c0392b;
    transform: translateY(2px);
    animation: hero-caret 0.9s steps(2, start) infinite;
}

@keyframes hero-caret {
    50% { opacity: 0; }
}

.hero-evidence .feedback-row {
    margin-top: 18px;
    margin-bottom: 0;
    transition: opacity 0.3s ease-out;
}

.hero-start-btn {
    display: block;
    margin: 32px auto 0;
    background: var(--fg);
    color: var(--bg);
    border: 2px solid var(--fg);
    padding: 14px 48px;
    font-size: 1rem;
    font-weight: 700;
    font-family: var(--font);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: opacity 0.4s ease-out, background 0.15s ease-out, color 0.15s ease-out;
    -webkit-appearance: none;
    appearance: none;
}
.hero-start-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg);
}

@media (max-width: 480px) {
    .hero-anim {
        padding: 16px;
    }

    .hero-evidence {
        width: min(100%, calc(100vw - 28px));
    }

    .hero-evidence-row {
        min-height: 84px;
        padding: 14px 15px;
    }

    .hero-evidence-row:last-child {
        min-height: 118px;
    }

    .hero-evidence-kicker {
        font-size: 0.72rem;
    }

    .hero-evidence-reason {
        font-size: 0.88rem;
    }

    .hero-evidence-prompt {
        font-size: 0.95rem;
    }
}

/* === Narrative Sections (Consent Page) === */
.narrative {
    margin-top: 0;
    padding-top: 40px;
}

.narrative-section {
    padding: 72px 0;
    border-top: 2px solid var(--border);
}

.narrative-title {
    font-size: clamp(1.8rem, 6vw, 3rem);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    line-height: 1;
    margin-bottom: 24px;
    color: var(--fg);
}

.narrative-body {
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.8;
    color: var(--fg);
    opacity: 0.7;
    max-width: 440px;
}

.narrative-highlight {
    color: var(--accent);
    font-weight: 700;
    opacity: 1;
}

/* Stat Grid */
.stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.stat-block {
    border: 4px solid var(--border);
    padding: 28px 20px;
}

.stat-number {
    display: block;
    font-size: clamp(3rem, 10vw, 5rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1;
    color: var(--fg);
    margin-bottom: 12px;
}

.stat-unit {
    font-size: 0.5em;
    color: var(--accent);
}

.stat-desc {
    font-size: 0.85rem;
    font-weight: 400;
    line-height: 1.6;
    color: var(--fg);
    opacity: 0.6;
}

/* Rule List */
.rule-list {
    max-width: 440px;
}

.rule-item {
    display: flex;
    gap: 16px;
    align-items: baseline;
    padding: 16px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.6;
    color: var(--fg);
}

.rule-num {
    color: var(--accent);
    font-weight: 900;
    font-size: 0.85rem;
    flex-shrink: 0;
    letter-spacing: 0.05em;
}

.bpe-detail-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    max-width: 440px;
    margin-top: 24px;
    padding: 18px 20px;
    border: 3px solid var(--border);
    background: var(--bg);
}

.bpe-detail-title {
    color: var(--accent);
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.bpe-detail-copy {
    color: var(--fg);
    font-size: 0.9rem;
    font-weight: 400;
    line-height: 1.65;
    opacity: 0.72;
}

.bpe-detail-button {
    white-space: nowrap;
}

/* Paper Link */
.paper-link {
    display: inline-block;
    margin-top: 20px;
    color: var(--fg);
    text-decoration: underline;
    text-underline-offset: 4px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.9rem;
    transition: color 0.15s ease-out;
}

.paper-link:hover {
    color: var(--accent);
}

/* Narrative Responsive */
@media (max-width: 560px) {
    .narrative-section {
        padding: 48px 0;
    }

    .stat-grid {
        grid-template-columns: 1fr;
    }

    .narrative-title {
        font-size: clamp(1.5rem, 8vw, 2.2rem);
    }

    .bpe-detail-card {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .bpe-detail-button {
        justify-self: start;
    }
}

/* === Label Display Module (展签风格) === */
.label-display {
    padding: 18px 22px 20px;
    margin-bottom: 0;
    text-align: left;
    position: relative;
    z-index: 1;
}

.label-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.6;
}

.label-row + .label-row {
    margin-top: 8px;
}

.label-field {
    flex-shrink: 0;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
}

.label-value {
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--fg);
    min-width: 0;
}

.label-value--bold {
    font-weight: 700;
    font-size: 0.95rem;
}

/* Info button (?) */
.info-btn {
    margin-left: auto;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border: 2px solid var(--border);
    background: var(--bg);
    color: var(--fg);
    font-size: 0.8rem;
    font-weight: 700;
    font-family: var(--font);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease-out, color 0.15s ease-out, border-color 0.15s ease-out;
    -webkit-tap-highlight-color: transparent;
}

.info-btn:hover,
.info-btn.active {
    background: var(--fg);
    color: var(--bg);
    border-color: var(--fg);
}

.info-btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Info Card (definition/example) */
.info-card {
    border: 2px solid var(--border);
    padding: 20px;
    margin-bottom: 12px;
    background: var(--bg);
    animation: fadeIn 0.2s ease-out;
}

.annotation-main-card .info-card {
    position: relative;
    z-index: 1;
    border-width: 2px 0 0;
    margin: 0;
    padding: 16px 22px 18px;
    background: #fafafa;
}

.info-card-section + .info-card-section {
    margin-top: 14px;
}

.info-card-title {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent);
    margin-bottom: 4px;
}

.info-card-text {
    font-size: 0.88rem;
    font-weight: 400;
    line-height: 1.6;
    color: var(--fg);
}

/* === Feedback Row (like-button style) === */
.feedback-row {
    display: flex;
    justify-content: center;
    gap: 22px;
    margin-top: 24px;
    margin-bottom: 16px;
}

.queue-nav-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(120px, 160px));
    justify-content: center;
    align-items: center;
    gap: 14px;
    margin: 10px 0 18px;
}

.queue-nav-btn {
    min-width: 0;
    width: 100%;
    border: 2px solid var(--border);
    background: #fff;
    color: var(--fg);
    padding: 10px 18px;
    font-family: var(--font);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.14s ease-out, color 0.14s ease-out, opacity 0.14s ease-out;
}

.queue-nav-btn:hover:not(:disabled) {
    background: var(--fg);
    color: #fff;
}

.queue-nav-btn:disabled {
    cursor: not-allowed;
    opacity: 0.35;
}

.like-button {
    position: relative;
    cursor: pointer;
    display: flex;
    height: 58px;
    border-radius: 999px;
    border: 2px solid var(--border);
    background: #fff;
    overflow: hidden;
    transition: border-color 0.10s ease-out, box-shadow 0.10s ease-out, background 0.10s ease-out, transform 0.10s ease-out;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.annotation-edit-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    margin: 6px 0 18px;
}

.annotation-edit-note {
    color: #666;
    font-size: 0.78rem;
    font-weight: 400;
}

.annotation-edit-save {
    border: 2px solid var(--border);
    background: var(--fg);
    color: #fff;
    padding: 10px 24px;
    font-family: var(--font);
    font-size: 0.82rem;
    font-weight: 800;
    cursor: pointer;
}

.annotation-edit-save:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.like-button:hover {
    background: #fff;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
}

.like-button[data-choice="agree"]:hover {
    border-color: var(--accent);
}

.like-button[data-choice="disagree"]:hover {
    border-color: var(--fg);
}

.like-button:focus-visible {
    outline: 2px solid #c0392b;
    outline-offset: 2px;
}

.like-button.disabled {
    pointer-events: none;
}

.like-button.disabled:not(.selected) {
    opacity: 0.35;
}

.like-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 28px;
    height: 100%;
    cursor: pointer;
}

.like-icon {
    fill: #333;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    transition: fill 0.16s ease-out, transform 0.16s ease-out;
}

.like-text {
    font-size: 0.95rem;
    font-weight: 700;
    font-family: var(--font);
    color: #111;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

/* Count compartment — hidden by default */
.like-count {
    display: none;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    padding: 0 12px;
    height: 100%;
    border-left: 2px solid #cfcfcf;
    font-size: 0.85rem;
    font-weight: 700;
    font-family: var(--font);
    color: #666;
    white-space: nowrap;
    transform: translateY(50px);
    transition: transform 0.22s ease-out, color 0.22s ease-out;
}

/* When count is revealed */
.like-count.visible {
    display: flex;
    transform: translateY(0);
    color: #111;
}

/* Selected states */
.like-button.selected {
    transform: none;
    box-shadow: none;
}

.like-button.selected[data-choice="agree"] {
    border-color: var(--accent);
    background: #fff;
    box-shadow: inset 0 -3px 0 var(--accent);
}

.like-button.selected[data-choice="agree"] .like-icon {
    fill: #c0392b;
    animation: icon-pop 0.16s ease-out;
}

.like-button.selected[data-choice="agree"] .like-text,
.like-button.selected[data-choice="agree"] .like-count {
    color: #111;
}

.like-button.selected[data-choice="agree"] .like-count {
    border-left-color: #efb7aa;
}

.like-button.selected[data-choice="disagree"] {
    border-color: #000;
    background: #f2f2f2;
    box-shadow: inset 0 -3px 0 #000;
}

.like-button.selected[data-choice="disagree"] .like-icon {
    fill: #000;
    animation: icon-pop 0.16s ease-out;
}

.like-button.selected[data-choice="disagree"] .like-text,
.like-button.selected[data-choice="disagree"] .like-count {
    color: #000;
}

.like-button.selected[data-choice="disagree"] .like-count {
    border-left-color: #b5b5b5;
}

@keyframes icon-pop {
    0%   { transform: scale(0.5); }
    60%  { transform: scale(1.25); }
    100% { transform: scale(1); }
}

/* === Progress Bar (赞同率 — EMPATHY style) === */
.progress-wrap {
    padding: 14px 0;
    margin-bottom: 16px;
    animation: fadeIn 0.3s ease-out;
}

.progress-meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
}

.progress-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: #999;
    letter-spacing: 0.02em;
}

.progress-value {
    font-size: 1.3rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    color: var(--fg);
}

.progress-track {
    height: 8px;
    background: #ececec;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #c0392b;
    border-radius: 4px;
    width: 0%;
    transition: width 0.35s ease-out;
}

/* === Disagree Feedback Form === */
.disagree-form {
    border: 3px solid var(--border);
    margin-bottom: 16px;
    animation: slideDown 0.25s ease-out;
    overflow: hidden;
}

@keyframes slideDown {
    from { opacity: 0; max-height: 0; transform: translateY(-8px); }
    to   { opacity: 1; max-height: 500px; transform: translateY(0); }
}

.disagree-form-header {
    padding: 12px 20px;
    border-bottom: 2px solid var(--border);
    background: var(--muted);
}

.disagree-form-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--fg);
}

.disagree-form-body {
    padding: 16px 20px;
}

.disagree-field-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent);
    margin-bottom: 4px;
    margin-top: 12px;
}

.disagree-field-label:first-child {
    margin-top: 0;
}

.disagree-input,
.disagree-textarea {
    width: 100%;
    height: 44px;
    min-height: 44px;
    padding: 10px 0;
    border: none;
    border-bottom: 2px solid var(--border);
    font-size: 0.9rem;
    line-height: 1.4;
    font-family: var(--font);
    background: transparent;
    color: var(--fg);
    outline: none;
    transition: border-color 0.15s ease-out;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}

.disagree-textarea {
    resize: none;
    overflow: hidden;
}

.disagree-input:focus,
.disagree-textarea:focus {
    border-bottom-color: var(--accent);
}

.disagree-note {
    color: #777;
    font-size: 0.76rem;
    line-height: 1.55;
    margin: 10px 0 0;
}

.disagree-form-actions {
    display: flex;
    gap: 12px;
    padding: 12px 20px 16px;
    justify-content: flex-end;
}

.disagree-form.edit-mode .disagree-form-actions {
    display: none;
}

.btn-disagree-skip {
    background: none;
    border: 2px solid var(--border);
    padding: 10px 24px;
    font-size: 0.8rem;
    font-weight: 700;
    font-family: var(--font);
    color: #999;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    -webkit-appearance: none;
    appearance: none;
}

.btn-disagree-skip:hover {
    border-color: var(--fg);
    color: var(--fg);
}

.btn-disagree-submit {
    background: var(--fg);
    border: 2px solid var(--fg);
    padding: 10px 24px;
    font-size: 0.8rem;
    font-weight: 700;
    font-family: var(--font);
    color: var(--bg);
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    -webkit-appearance: none;
    appearance: none;
}

.btn-disagree-submit:active {
    background: var(--accent);
    border-color: var(--accent);
}

.disagree-hint {
    color: var(--accent);
    font-size: 0.8rem;
    margin: 8px 0 0;
    text-align: center;
}

/* === Admin Dashboard === */
.admin-page {
    max-width: 640px;
    padding-bottom: 60px;
}

.admin-page-wide {
    max-width: 1180px;
}

.admin-shell-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

.admin-title {
    font-size: 1.8rem;
    font-weight: 900;
    line-height: 1.1;
    margin: 8px 0 0;
}

.admin-head-actions {
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.admin-live-indicator {
    color: #777;
    font-size: 0.78rem;
    font-weight: 600;
}

.admin-login-card {
    margin-top: 48px;
    border: 3px solid var(--border);
    padding: 32px 24px;
    text-align: center;
}

.admin-login-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 24px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.admin-input {
    display: block;
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 0;
    font-family: var(--font);
    font-size: 1rem;
    font-weight: 500;
    outline: none;
    -webkit-appearance: none;
    margin-bottom: 12px;
}

.admin-input:focus {
    border-color: var(--accent);
}

.admin-error {
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.admin-btn {
    display: block;
    width: 100%;
    padding: 14px;
    background: var(--fg);
    color: var(--bg);
    font-family: var(--font);
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border: none;
    cursor: pointer;
    -webkit-appearance: none;
}

.admin-btn:active {
    opacity: 0.8;
}

.admin-refresh-btn {
    display: inline-block;
    margin: 16px 0;
    padding: 8px 20px;
    border: 2px solid var(--border);
    background: var(--bg);
    font-family: var(--font);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    cursor: pointer;
    -webkit-appearance: none;
}

.admin-refresh-btn:active {
    background: var(--fg);
    color: var(--bg);
}

.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 32px;
}

.admin-stats-grid-wide {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.admin-stat-card {
    border: 2px solid var(--border);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.admin-stat-value {
    font-size: 1.8rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    line-height: 1;
}

.admin-stat-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #999;
}

.admin-section {
    margin-bottom: 32px;
}

.admin-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.admin-section-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
    margin: 0;
}

.admin-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.admin-table-dense {
    min-width: 900px;
    font-size: 0.78rem;
}

.admin-table th {
    text-align: left;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.7rem;
    color: #999;
    padding: 8px 12px;
    border-bottom: 2px solid var(--border);
}

.admin-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #eee;
    font-variant-numeric: tabular-nums;
}

.admin-table tbody tr:hover {
    background: var(--muted);
}

.admin-row-warning {
    background: #fff6f4;
}

.admin-token-cell {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 700;
}

.admin-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    padding: 2px 7px;
    font-size: 0.7rem;
    font-weight: 800;
    line-height: 1.2;
    white-space: nowrap;
}

.admin-pill.ok {
    border-color: var(--fg);
    color: var(--fg);
}

.admin-pill.warn {
    border-color: var(--accent);
    color: var(--accent);
}

.admin-export-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.admin-export-btn {
    display: inline-block;
    padding: 10px 20px;
    border: 2px solid var(--border);
    font-family: var(--font);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--fg);
    text-decoration: none;
    cursor: pointer;
    -webkit-appearance: none;
    transition: background 0.15s, color 0.15s;
}

.admin-export-btn:hover {
    background: var(--fg);
    color: var(--bg);
}

.site-footer {
    padding: 24px 16px 28px;
    text-align: center;
    font-size: 12px;
    color: #777;
}

.site-footer a {
    color: inherit;
    text-decoration: none;
}

.site-footer a:hover {
    color: var(--fg);
    text-decoration: underline;
}

@media (max-width: 480px) {
    .admin-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .admin-stat-value {
        font-size: 1.4rem;
    }
    .admin-export-row {
        flex-direction: column;
    }
    .admin-export-btn {
        text-align: center;
    }
}

/* === Responsive === */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
