/**
 * Bureaucratic, high-stakes visual theme for Ethics Escape Room
 */

@import url('https://fonts.googleapis.com/css2?family=Lekton:ital,wght@0,400;0,700;1,400&display=swap');

:root {
    --bg-dark: #0a0e0a;
    --bg-darker: #050705;
    --bg-panel: #1a1f1a;
    --text-primary: #e0e0e0;
    --text-secondary: #a0a0a0;
    --text-amber: #ffb84d;
    --text-red: #ff4444;
    --border-color: #2a3a2a;
    --accent-green: #2d5a2d;
    --accent-red: #5a2d2d;
    --accent-amber-dark: rgb(175, 95, 5);
    --accent-green-light: #4caf50;
    --warning: #ffaa00;
    --font-title: "Lekton", monospace;
    --font-body: "Lekton", monospace;
    color-scheme: only dark;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    overflow-y: hidden;
}

/* Base typography */
h1 {
    font-size: 2rem;
    margin: 1rem 0;
    font-weight: bold;
}

h2 {
    font-size: 1.6rem;
    margin: 0.75rem 0;
    font-weight: bold;
}

h3 {
    font-size: 1.3rem;
    margin: 0.5rem 0;
    font-weight: bold;
}

h4 {
    font-size: 1.1rem;
    margin: 0.5rem 0;
    font-weight: bold;
}

ul,
ol {
    list-style-type: disc;
}

li {
    margin-left: -0.5rem;
}

strong {
    font-weight: bold;
}

p {
    margin: 0.5rem 0;
}

/* Header */
.game-header {
    background: var(--bg-darker);
    border-bottom: 2px solid var(--border-color);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.game-title {
    font-size: 1.2rem;
    color: var(--text-amber);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: bold;
}

.timer-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

#timer-display {
    font-size: 2rem;
    font-weight: bold;
    color: var(--text-amber);
    font-variant-numeric: tabular-nums;
    min-width: 80px;
    text-align: center;
}

#timer-display.warning {
    color: var(--warning);
    animation: pulse 1s infinite;
}

#timer-display.expired {
    color: var(--text-red);
    animation: blink 0.5s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

.clue-count {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.reset-button {
    background: var(--accent-red);
    border: 1px solid var(--text-red);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    padding-top: 0.65rem;
    font-family: var(--font-body);
    font-size: 0.85rem;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.2s;
}

.reset-button:hover {
    background: var(--text-red);
    color: var(--bg-dark);
}

.player-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-red);
    font-family: var(--font-body);
    font-size: 1rem;
}

.player-badge .player-icon {
    font-size: 1.2rem;
}

.player-badge .player-name {
    font-weight: bold;
}

.button-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 2rem 0;
    margin-bottom: 60px;
    width: 100%;
}

.submit-button {
    background: var(--accent-green);
    border: 1px solid var(--accent-green-light);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    padding-top: 0.65rem;
    font-family: var(--font-body);
    font-size: 0.85rem;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.2s;
}

.submit-button:hover {
    background: var(--accent-green-light);
    color: var(--bg-dark);
}

.button-placeholder {
    padding: 0.5rem 1rem;
    padding-top: 0.65rem;
    visibility: hidden;
}

/* Main Layout */
.game-container {
    min-height: calc(100dvh - 80px);
}

/* Main Content */
.main-content {
    width: 100%;
    padding: 2rem;
    overflow-y: auto;
    max-height: calc(100dvh - 80px);
    position: relative;
}

/* Clue Discovery Locations */
.discovery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.discovery-item {
    background: var(--bg-panel);
    border: 2px solid var(--border-color);
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.discovery-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 184, 77, 0.1), transparent);
    transition: left 0.5s;
}

.discovery-item:hover::before {
    left: 100%;
}

.discovery-item:hover {
    border-color: var(--text-amber);
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(255, 184, 77, 0.3);
}

.discovery-item.discovering {
    animation: discover 0.5s;
}

@keyframes discover {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

.discovery-item.discovered {
    opacity: 0.6;
    cursor: not-allowed;
}

.discovery-item.discovered::after {
    content: '✓';
    position: absolute;
    top: 10px;
    right: 10px;
    color: var(--text-amber);
    font-size: 1.5rem;
}

.discovery-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.discovery-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Clue Viewer */
#clue-viewer {
    display: none;
    background: var(--bg-panel);
    border: 2px solid var(--border-color);
    padding: 2rem;
    margin-bottom: 2rem;
    min-height: 400px;
}

.clue-header {
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
    position: relative;
}

.clue-header h2 {
    color: var(--text-amber);
    font-size: 1.5rem;
}

.clue-close-button {
    position: absolute;
    top: 0;
    right: 0;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.clue-close-button:hover {
    color: var(--text-amber);
    transform: scale(1.1);
}

.clue-close-button:active {
    transform: scale(0.95);
}

.clue-content {
    color: var(--text-primary);
    line-height: 1.8;
}

.clue-content h1,
.clue-content h2,
.clue-content h3 {
    color: var(--text-amber);
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.clue-content p {
    margin-bottom: 1rem;
}

.clue-content blockquote {
    border-left: 4px solid var(--accent-green);
    padding-left: 1rem;
    margin: 1rem 0;
    color: var(--text-secondary);
    font-style: italic;
}

.clue-content ul,
.clue-content ol {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.clue-content li {
    margin-bottom: 0.5rem;
}

/* Code Input */
.code-input-container {
    text-align: center;
    padding: 2rem;
}

.code-input-container input {
    background: var(--bg-darker);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    font-size: 1.2rem;
    font-family: var(--font-body);
    text-align: center;
    letter-spacing: 2px;
    margin: 1rem;
    width: 200px;
}

.code-input-container input:focus {
    outline: none;
    border-color: var(--text-amber);
    box-shadow: 0 0 10px rgba(255, 184, 77, 0.3);
}

.code-input-container button {
    background: var(--accent-green);
    border: none;
    color: var(--text-primary);
    padding: 0.75rem 2rem;
    font-size: 1rem;
    font-family: var(--font-body);
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.2s;
}

.code-input-container button:hover {
    background: var(--text-amber);
    color: var(--bg-dark);
}

.error-message {
    color: var(--text-red);
    margin-top: 1rem;
    font-size: 0.9rem;
}

/* Puzzles */
.puzzle-container {
    padding: 1rem;
}

.scale-input {
    margin: 1rem 0;
}

.scale-input label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.scale-input input[type="range"] {
    width: 100%;
    margin: 0.5rem 0;
}

.scale-input input[type="number"] {
    background: var(--bg-darker);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.5rem;
    width: 80px;
    text-align: center;
}

/* Bentham scales: high-stakes threat assessment console */
.bentham-puzzle {
    background: var(--bg-darker);
    border: 2px solid var(--border-color);
    padding: 1.5rem 1.75rem;
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.7);
}

.bentham-intro {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.bentham-scale-input {
    margin-top: 1.25rem;
}

.bentham-scale-input label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.8rem;
}

.bentham-puzzle input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 80.75%;
    margin: 0.5rem 10%;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--border-color), var(--text-amber));
    outline: none;
}

.bentham-puzzle input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--bg-dark);
    border: 2px solid var(--text-amber);
    box-shadow: 0 0 8px rgba(255, 184, 77, 0.5);
    cursor: pointer;
}

.bentham-puzzle input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--bg-dark);
    border: 2px solid var(--text-amber);
    box-shadow: 0 0 8px rgba(255, 184, 77, 0.5);
    cursor: pointer;
}

.bentham-scale-labels {
    display: flex;
    justify-content: space-between;
    gap: 0.35rem;
    margin-top: 0.5rem;
    font-size: 0.7rem;
    overflow-x: auto;
}

.bentham-scale-label {
    flex: 1;
    padding: 0.3rem 0.35rem;
    border-radius: 3px;
    border: 1px solid transparent;
    text-align: center;
    color: var(--text-secondary);
    background: rgba(0, 0, 0, 0.4);
    transition: all 0.15s ease-out;
}

.bentham-scale-label-value {
    font-weight: bold;
    margin-bottom: 0.1rem;
}

.bentham-scale-label-text {
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.bentham-scale-label.active {
    border-color: var(--text-amber);
    color: var(--text-primary);
    box-shadow: 0 0 10px rgba(255, 184, 77, 0.4);
}

.historical-records-puzzle ul,
.historical-records-puzzle ol,
.dirty-harry-puzzle ul,
.dirty-harry-puzzle ol,
.outcome ul,
.outcome ol {
    margin-left: 2em;
}

.matching-puzzle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 0;
    margin-bottom: 1rem;
}

.match-item {
    background: var(--bg-darker);
    border: 2px solid var(--border-color);
    padding: 1rem;
    margin: 0.5rem 0;
    cursor: move;
    transition: all 0.2s;
}

.match-item:hover {
    border-color: var(--text-amber);
}

.match-item.definition {
    cursor: default;
}

.match-item.example.dragging {
    opacity: 0.75;
    transform: translateY(-3px) rotate(-1deg);
}

.match-item.example.selected {
    border-color: var(--text-amber);
    box-shadow: 0 0 12px rgba(255, 184, 77, 0.5);
}

.definition-drop-zone {
    margin-top: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    border: 1px dashed var(--border-color);
    min-height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: var(--text-secondary);
    position: relative;
}

.definition-drop-zone::before {
    content: attr(data-placeholder);
    opacity: 0.7;
}

.definition-drop-zone.has-example::before {
    content: '';
}

.definition-drop-zone.drag-over {
    border-color: var(--text-amber);
    box-shadow: 0 0 12px rgba(255, 184, 77, 0.4);
}

.match-item.matched {
    background: var(--accent-green);
    opacity: 0.7;
}

.classification-puzzle {
    margin: 1rem 0;
}

.record-item {
    background: var(--bg-darker);
    border-left: 4px solid var(--border-color);
    padding: 1rem;
    margin: 1rem 0;
}

.record-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.record-badge {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-family: var(--font-body);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.15s ease-out;
}

.record-badge:hover {
    border-color: var(--text-amber);
    color: var(--text-primary);
}

.record-badge.selected {
    box-shadow: 0 0 12px rgba(45, 90, 45, 0.8);
}

.record-badge.selected[data-value="RC"] {
    background: var(--accent-green);
    border-color: var(--accent-green-light);
    color: var(--text-primary);
}

.record-badge.selected[data-value="IB"] {
    background: var(--accent-amber-dark);
    border-color: var(--text-amber);
    color: var(--text-primary);
}

.record-badge.selected[data-value="DE"] {
    background: var(--accent-red);
    border-color: var(--text-red);
    color: var(--text-primary);
}

/* Form Selection View */
#form-selection-view {
    margin: 0 auto;
    min-height: 400px;
    max-width: 750px;
}

.form-selection-header {
    margin-bottom: 2rem;
    text-align: center;
}

.back-button {
    background: var(--bg-darker);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    padding-top: 0.65rem;
    font-family: var(--font-body);
    font-size: 0.9rem;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.2s;
    display: inline-block;
    margin-bottom: 1rem;
}

.back-button:hover {
    background: var(--border-color);
    border-color: var(--text-amber);
}

.form-selection-header h2 {
    color: var(--text-amber);
    margin-bottom: 1rem;
    margin-top: 0;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: var(--bg-panel);
    border: 2px solid var(--border-color);
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.5);
    position: relative;
}

.modal-content h2 {
    color: var(--text-amber);
    margin-bottom: 1rem;
}

.modal-content p {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.modal-buttons {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.modal-button {
    padding: 0.75rem 1.5rem;
    border: none;
    font-family: var(--font-body);
    font-size: 1rem;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.2s;
}

.modal-button-primary {
    background: var(--accent-green);
    color: var(--text-primary);
}

.modal-button-primary:hover {
    background: var(--text-amber);
    color: var(--bg-dark);
}

.modal-button-secondary {
    background: var(--bg-darker);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.modal-button-secondary:hover {
    background: var(--border-color);
}

.forms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
}

.form-card {
    background: var(--bg-darker);
    border: 2px solid var(--border-color);
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
}

.form-card:hover {
    border-color: var(--text-amber);
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(255, 184, 77, 0.3);
}

.form-card h3 {
    color: var(--text-amber);
    margin-bottom: 1rem;
}

.form-preview {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    min-height: 100px;
}

.form-card button {
    background: var(--accent-green);
    border: none;
    color: var(--text-primary);
    padding: 0.75rem 1.5rem;
    font-family: var(--font-body);
    cursor: pointer;
    width: 100%;
    text-transform: uppercase;
}

/* Team Selection Slots */
.team-slot {
    background: var(--bg-darker);
    border: 2px solid var(--border-color);
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.team-slot h3 {
    color: var(--text-amber);
    margin-top: 0;
    margin-bottom: 1rem;
}

.team-selection-container {
    margin: 2rem auto;
}

/* Custom Form Builder */
#custom-form-view {
    margin: 0 auto;
    max-width: 750px;
}

/* Outcomes */
.outcome {
    background: var(--bg-darker);
    border: 2px solid var(--text-red);
    padding: 2rem;
    margin: 2rem 0;
}

.outcome h2 {
    color: var(--text-red);
    margin-bottom: 1rem;
}

.debrief-placeholder {
    background: var(--bg-panel);
    border: 2px dashed var(--border-color);
    padding: 2rem;
    margin: 2rem 0;
    text-align: center;
    color: var(--text-secondary);
}

/* Debrief Section */
.debrief-container {
    margin: 2rem 0;
}

.debrief-section {
    margin-bottom: 2rem;
}

.debrief-section:last-child {
    margin-bottom: 0;
}

#clue-viewer.debrief-view {
    margin: 0 auto;
    border: none;
    background: none;
    max-width: 750px;
}

.print-button {
    display: block;
    background: var(--accent-green);
    border: none;
    color: var(--text-primary);
    padding: 0.75rem 1.5rem;
    font-family: var(--font-body);
    cursor: pointer;
    margin: 1rem auto;
    width: auto;
    text-transform: uppercase;
}

.print-button:hover {
    background: var(--text-amber);
    color: var(--bg-dark);
}

/* Virtue Sliders */
.virtue-slider-container {
    margin-bottom: 2rem;
}

.virtue-scale {
    position: relative;
    margin-bottom: 0.5rem;
}

.virtue-scale-track {
    position: relative;
    height: 30px;
    padding: 10px 0;
}

.virtue-scale-line {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--border-color);
    transform: translateY(-50%);
}

.virtue-hash-mark {
    position: absolute;
    top: 50%;
    width: 2px;
    background: var(--border-color);
    transform: translateY(-50%);
}

.virtue-hash-left {
    left: 0;
    height: 12px;
}

.virtue-hash-middle {
    left: 50%;
    height: 15px;
    background: var(--text-amber);
    transform: translate(-50%, -50%);
}

.virtue-hash-right {
    right: 0;
    height: 12px;
}

.virtue-knob {
    position: absolute;
    top: 50%;
    width: 20px;
    height: 20px;
    background: var(--text-amber);
    border: 2px solid var(--bg-dark);
    border-radius: 50%;
    pointer-events: none;
    z-index: 4;
    transform: translate(-50%, -50%);
    transition: left 0.1s ease;
}

.virtue-range-input {
    -webkit-appearance: none;
    appearance: none;
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    width: 100%;
    height: 20px;
    margin: 0;
    padding: 0;
    background: transparent;
    outline: none;
    cursor: pointer;
    z-index: 3;
    transform: translateY(-50%);
    opacity: 0;
}

.virtue-range-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    opacity: 1;
}

.virtue-range-input::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    opacity: 1;
}

.virtue-range-input::-webkit-slider-runnable-track {
    width: 100%;
    height: 20px;
    background: transparent;
}

.virtue-range-input::-moz-range-track {
    width: 100%;
    height: 20px;
    background: transparent;
}

.virtue-scale span {
    width: 120px;
    text-align: center;
}

.virtue-scale span:first-child {
    text-align: left;
}

.virtue-scale span:last-child {
    text-align: right;
}

/* Deontology Checkboxes */
.debrief-section label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.75rem;
    background: var(--bg-darker);
    border: 1px solid var(--border-color);
    transition: all 0.2s;
}

.debrief-section label:hover {
    border-color: var(--text-amber);
    background: var(--bg-panel);
}

.debrief-section input[type="checkbox"] {
    margin-top: 0.25rem;
    cursor: pointer;
    width: 18px;
    height: 18px;
    accent-color: var(--text-amber);
    flex-shrink: 0;
}

/* MDOS Chart */
.mdos-chart-container {
    position: relative;
}

.mdos-chart {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 2rem 0;
    overflow-x: auto;
    overflow-y: visible;
}

.chart-cell {
    background: var(--bg-darker);
    border: 2px solid var(--border-color);
    padding: 1rem;
    text-align: center;
}

.chart-cell.question {
    color: var(--text-amber);
    font-weight: bold;
}

.mdos-answer-label {
    display: block;
    font-weight: bold;
    color: var(--text-red);
    margin-bottom: 0.25rem;
    text-transform: uppercase;
}

.mdos-answer-clue {
    color: var(--text-amber);
    font-weight: bold;
}

.mdos-chart-container #shue-postit {
    top: auto;
    left: 0.75rem;
    right: auto;
}

/* Responsive Design */
@media (max-width: 768px) {
    .discovery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .matching-puzzle {
        grid-template-columns: 1fr;
    }

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

    .game-header {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    #timer-display {
        font-size: 1.5rem;
    }

    .postit-note {
        position: relative;
        float: none;
        margin: 1rem 0;
        max-width: 100%;
    }

    #shue-postit,
    #pager-postit {
        top: auto;
        right: auto;
    }

    .steinhoff-mobile-hint {
        display: block;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 1rem;
    }

    #clue-viewer {
        padding: 1rem;
    }

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

/* Post-it Note */
.main-content {
    position: relative;
}

.postit-note {
    position: absolute;
    background: #ffeb3b;
    color: #333;
    padding: 1rem;
    max-width: 250px;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
    transform: rotate(-3deg);
    border: 1px solid rgba(0, 0, 0, 0.1);
    font-family: var(--font-body);
    font-size: 0.85rem;
    line-height: 1.4;
    z-index: 10;
    cursor: grab;
    user-select: none;
}

.postit-note:active {
    cursor: grabbing;
}

#shue-postit {
    top: 20px;
    right: 20px;
    transform: rotate(-3deg);
}

#pager-postit {
    top: 175px;
    right: 20px;
    transform: rotate(2deg);
}

.postit-note::before {
    content: '';
    position: absolute;
    top: -5px;
    right: 15px;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.5);
    clip-path: polygon(0 0, 100% 0, 100% 100%);
}

.postit-content {
    position: relative;
    z-index: 1;
}

.postit-content strong {
    color: #d32f2f;
}

/* Print styles for documents */
@media print {
    @page {
        size: letter;
        margin: 0.75in;
    }

    body {
        background: white;
        color: black;
        overflow: visible !important;
        height: auto !important;
        max-height: none !important;
    }

    .game-header,
    .discovery-grid,
    #form-selection,
    .postit-note,
    .back-button {
        display: none !important;
    }

    .main-content {
        padding: 0;
        overflow: visible !important;
        max-height: none !important;
        height: auto !important;
    }

    .game-container {
        min-height: auto !important;
        height: auto !important;
    }

    /* Debrief view styles */
    #clue-viewer.debrief-view {
        display: block !important;
        background: white !important;
        color: black !important;
        border: none !important;
        padding: 0 !important;
        margin: 0 !important;
        max-width: 100% !important;
        min-height: auto !important;
        height: auto !important;
        overflow: visible !important;
    }

    #clue-viewer {
        display: block !important;
        overflow: visible !important;
        max-height: none !important;
        height: auto !important;
        min-height: auto !important;
        max-width: none !important;
    }

    #clue-viewer.debrief-view .clue-header,
    #clue-viewer.debrief-view .clue-content,
    #clue-viewer.debrief-view .outcome,
    #clue-viewer.debrief-view .debrief-container {
        background: white !important;
        color: black !important;
    }

    #clue-viewer.debrief-view h2,
    #clue-viewer.debrief-view h3,
    #clue-viewer.debrief-view h4 {
        color: black !important;
        page-break-after: avoid;
    }

    #clue-viewer.debrief-view p,
    #clue-viewer.debrief-view span,
    #clue-viewer.debrief-view div {
        color: black !important;
    }

    #clue-viewer.debrief-view strong {
        color: black !important;
        font-weight: bold;
    }

    /* Outcome section */
    #clue-viewer.debrief-view .outcome {
        border: 2px solid black !important;
        padding: 1rem;
        margin: 1rem 0;
        page-break-inside: avoid;
    }

    #clue-viewer.debrief-view .outcome h2 {
        color: black !important;
        border-bottom: 2px solid black;
        padding-bottom: 0.5rem;
    }

    /* Team votes section */
    #clue-viewer.debrief-view .team-slot {
        background: white !important;
        border: 1px solid black !important;
        padding: 1rem;
        margin-bottom: 1rem;
        page-break-inside: avoid;
    }

    #clue-viewer.debrief-view .team-slot h3 {
        color: black !important;
        border-bottom: 1px solid black;
        padding-bottom: 0.5rem;
        margin-bottom: 0.75rem;
    }

    /* Deontology section */
    #clue-viewer.debrief-view .debrief-section {
        page-break-inside: avoid;
        margin-bottom: 1.5rem;
    }

    #clue-viewer.debrief-view .debrief-section h3,
    #clue-viewer.debrief-view .debrief-section h4 {
        color: black !important;
        border-bottom: 1px solid black;
        padding-bottom: 0.5rem;
        margin-bottom: 0.75rem;
    }

    #clue-viewer.debrief-view .debrief-section label {
        background: white !important;
        border: none !important;
        color: black !important;
        padding: 0.5rem 0.5rem 0 1.75rem !important;
        margin-bottom: 0 !important;
        display: block;
        page-break-inside: avoid;
        position: relative;
    }

    /* Hide checkboxes, show checkmark text */
    #clue-viewer.debrief-view .debrief-section input[type="checkbox"] {
        display: none !important;
    }

    /* Show checkmark for checked checkboxes using label::before */
    #clue-viewer.debrief-view .debrief-section label:has(input[type="checkbox"]:checked)::before {
        content: "✓ ";
        position: absolute;
        left: 0.5rem;
        top: 0.5rem;
        font-weight: bold;
        font-size: 1.2rem;
        color: black;
    }

    /* Show empty box for unchecked checkboxes */
    #clue-viewer.debrief-view .debrief-section label:has(input[type="checkbox"]:not(:checked))::before {
        content: "☐ ";
        position: absolute;
        left: 0.5rem;
        top: 0.5rem;
        color: black;
    }

    /* Fallback for browsers that don't support :has() - show text indicator */
    #clue-viewer.debrief-view .debrief-section input[type="checkbox"][checked]+div::before {
        content: "[UPHELD] ";
        font-weight: bold;
        color: black;
    }

    /* Virtue sliders - hide interactive elements, show scale */
    #clue-viewer.debrief-view .virtue-range-input {
        display: none !important;
    }

    /* Show the scale line in print - use border instead of background for better print visibility */
    #clue-viewer.debrief-view .virtue-scale-line {
        display: block !important;
        position: absolute !important;
        top: 50% !important;
        left: 0 !important;
        right: 0 !important;
        background: black !important;
        border-top: 3px solid black !important;
        height: 3px !important;
        min-height: 3px !important;
        transform: translateY(-50%) !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        color-adjust: exact !important;
    }

    /* Show hash marks in print - use border and background for better print visibility */
    #clue-viewer.debrief-view .virtue-hash-mark {
        display: block !important;
        position: absolute !important;
        top: 50% !important;
        background: black !important;
        border-left: 3px solid black !important;
        width: 3px !important;
        min-width: 3px !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        color-adjust: exact !important;
    }

    #clue-viewer.debrief-view .virtue-hash-left {
        left: 0 !important;
        height: 12px !important;
        min-height: 12px !important;
        transform: translateY(-50%) !important;
    }

    #clue-viewer.debrief-view .virtue-hash-middle {
        left: 50% !important;
        border-left: 3px solid black !important;
        background: black !important;
        height: 15px !important;
        min-height: 15px !important;
        transform: translate(-50%, -50%) !important;
    }

    #clue-viewer.debrief-view .virtue-hash-right {
        right: 0 !important;
        border-right: 3px solid black !important;
        border-left: none !important;
        background: black !important;
        width: 3px !important;
        height: 12px !important;
        min-height: 12px !important;
        transform: translateY(-50%) !important;
    }

    /* Show knob in print */
    #clue-viewer.debrief-view .virtue-knob,
    #clue-viewer.debrief-view [id^="virtue-indicator-"] {
        display: block !important;
        background: black !important;
        border: 2px solid black !important;
    }

    /* Show the scale track container in print */
    #clue-viewer.debrief-view .virtue-scale-track {
        display: block !important;
        position: relative !important;
        background: white !important;
        height: 30px !important;
        padding: 10px 0 !important;
    }

    /* Show the label spans */
    #clue-viewer.debrief-view .virtue-scale>div:first-of-type {
        border: none !important;
        background: white !important;
        height: auto !important;
        padding: 0.25rem 0;
        margin-bottom: 0.5rem;
        display: flex !important;
    }

    #clue-viewer.debrief-view .virtue-scale span {
        color: black !important;
    }

    #clue-viewer.debrief-view .virtue-slider-container {
        page-break-inside: avoid;
        margin-bottom: 1.5rem;
    }

    #clue-viewer.debrief-view .virtue-slider-container h4 {
        color: black !important;
        border-bottom: 1px solid black;
        padding-bottom: 0.25rem;
        margin-bottom: 0.5rem;
    }

    /* Make virtue value labels prominent */
    #clue-viewer.debrief-view [id^="virtue-label-"] {
        color: black !important;
        font-weight: bold;
        font-size: 1rem;
        margin-top: 0.5rem;
        padding: 0.5rem;
        background: #f0f0f0;
    }

    /* Ensure all text is black */
    #clue-viewer.debrief-view * {
        color: black !important;
    }

    /* Keep amber/colored text as black for print */
    #clue-viewer.debrief-view [style*="color: var(--text-amber)"],
    #clue-viewer.debrief-view [style*="color:var(--text-amber)"] {
        color: black !important;
    }

    #clue-viewer.debrief-view [style*="color: var(--text-primary)"],
    #clue-viewer.debrief-view [style*="color:var(--text-primary)"] {
        color: black !important;
    }

    #clue-viewer.debrief-view [style*="color: var(--text-secondary)"],
    #clue-viewer.debrief-view [style*="color:var(--text-secondary)"] {
        color: black !important;
    }

    /* Borders and separators */
    #clue-viewer.debrief-view .debrief-container {
        border: none !important;
        padding: 1rem;
        margin-top: 1rem;
    }

    #clue-viewer.debrief-view .debrief-section {
        border-bottom: 1px solid #ccc;
        padding-bottom: 1rem;
        margin-bottom: 1rem;
    }

    #clue-viewer.debrief-view .debrief-section:last-child {
        border-bottom: none;
    }

    .reset-button {
        display: none;
    }

    .print-button {
        display: none;
    }
}

/* Disabled form controls */
select:disabled,
textarea:disabled,
textarea[readonly] {
    opacity: 0.5;
    cursor: not-allowed;
}

.record-item select:disabled,
.record-item textarea:disabled,
.record-item textarea[readonly] {
    background: var(--bg-darker);
    color: var(--text-secondary);
    border-color: var(--border-color);
}

/* Eiree message prompt */
.eiree-message {
    text-align: center;
    margin: 2rem 0;
    padding: 1rem;
    background: var(--bg-darker);
    border: 2px dashed var(--text-amber);
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-amber);
    font-size: 1.1rem;
    font-style: italic;
}

.eiree-message:hover {
    border-color: var(--text-red);
    background: var(--bg-dark);
    color: var(--text-red);
}

.eiree-message p {
    font-size: 1.1rem;
    margin: 0;
    font-style: italic;
}