* { box-sizing: border-box; margin: 0; padding: 0; }

.header-nav { display: flex; align-items: center; gap: 1rem; }
.header-user { color: #adc8d8; font-size: 0.9rem; }
.header-link { color: #fff; font-size: 0.9rem; text-decoration: none; }
.header-link:hover { text-decoration: underline; }

.auth-form {
    max-width: 400px;
    margin: 3rem auto;
    padding: 2rem;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.auth-form h1 { margin-bottom: 1.5rem; color: #1a3a4a; }

.auth-form label {
    display: block;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #444;
}

.auth-form input {
    display: block;
    width: 100%;
    margin-top: 0.3rem;
    padding: 0.5rem 0.7rem;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.auth-form button {
    width: 100%;
    padding: 0.6rem;
    background: #1a3a4a;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 0.5rem;
}

.auth-form button:hover { background: #c47a2a; }

.auth-error {
    background: #fff0f0;
    border: 1px solid #e88;
    color: #900;
    padding: 0.6rem 0.8rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.auth-alt { margin-top: 1rem; font-size: 0.9rem; color: #666; }
.auth-alt a { color: #1a3a4a; }

body {
    font-family: Georgia, serif;
    color: #222;
    background: #fafaf8;
    line-height: 1.6;
}

header {
    background: #1a3a4a;
    padding: 1rem 2rem;
}

.site-title {
    color: #fff;
    text-decoration: none;
    font-size: 1.4rem;
    letter-spacing: 0.05em;
}

main { max-width: 860px; margin: 2rem auto; padding: 0 1.5rem; }

h1 { font-size: 1.8rem; margin-bottom: 0.5rem; color: #1a3a4a; }
.subtitle { color: #666; margin-bottom: 2rem; }

.territory { border: 1px solid #ddd; border-radius: 6px; margin-bottom: 1rem; }

.territory-header {
    width: 100%; display: flex; justify-content: space-between;
    align-items: center; padding: 1rem 1.2rem;
    background: #f0f4f6; border: none; cursor: pointer;
    font-size: 1rem; font-family: Georgia, serif; text-align: left;
    border-radius: 6px;
}

.territory-header:hover { background: #e4ecf0; }
.territory-count { color: #888; font-size: 0.85rem; }
.territory-tagline { display: block; font-style: italic; color: #888; font-size: 0.85rem; margin-top: 0.15rem; }

.emotions { display: none; padding: 0.5rem 1rem 1rem; }
.territory.open .emotions { display: block; }

.emotion { margin-bottom: 0.4rem; }

.emotion-header {
    background: none; border: none; cursor: pointer;
    font-family: Georgia, serif; font-size: 0.95rem;
    color: #1a3a4a; padding: 0.3rem 0.5rem;
    text-decoration: underline; text-align: left;
}

.emotion-header:hover { color: #c47a2a; }

.scripts-container { padding-left: 1rem; margin-top: 0.5rem; }

.script-card {
    border: 1px solid #e0e0e0; border-radius: 4px;
    padding: 0.8rem 1rem; margin-bottom: 0.5rem;
    background: #fff;
}

.card-rating { color: #c47a2a; font-size: 0.85rem; margin: 0.3rem 0; }
.card-rating-count { color: #888; }

.script-title { font-weight: bold; font-size: 0.95rem; }
.script-meta { color: #555; font-size: 0.85rem; margin: 0.2rem 0 0.5rem; }
.script-text.gauntlet { white-space: normal; }

.download-btn {
    display: inline-block; padding: 0.3rem 0.8rem;
    background: #1a3a4a; color: #fff; border-radius: 4px;
    text-decoration: none; font-size: 0.85rem;
}

.download-btn:hover { background: #c47a2a; }
.no-scripts { color: #888; font-size: 0.9rem; padding: 0.5rem; }

.breadcrumb { margin-bottom: 1.5rem; }
.breadcrumb a { color: #1a3a4a; font-size: 0.9rem; }

.script-detail { max-width: 720px; }

.script-header { margin-bottom: 2rem; border-bottom: 2px solid #1a3a4a; padding-bottom: 1rem; }
.script-number { color: #888; font-size: 0.85rem; margin-bottom: 0.3rem; }
.script-header h1 { font-size: 1.8rem; color: #1a3a4a; }
.script-source { color: #555; margin-top: 0.3rem; }

.field-section, .character-section, .levels-section, .fire-keeper-section {
    margin-bottom: 2rem;
}

h2 { font-size: 1.1rem; color: #1a3a4a; margin: 1.2rem 0 0.4rem; border-bottom: 1px solid #eee; padding-bottom: 0.2rem; }
h3 { font-size: 1rem; color: #333; margin: 1rem 0 0.4rem; }

.field-definition { font-style: italic; color: #333; }
.territory-header-text { color: #666; font-size: 0.9rem; }

.contrasts { padding-left: 1.2rem; }
.contrasts li { margin-bottom: 0.4rem; font-size: 0.95rem; }

.read-silently { font-size: 0.8rem; color: #888; font-weight: normal; }
.as-if { font-style: italic; }

.level-block { margin-bottom: 1.5rem; padding: 1rem; background: #f8f8f6; border-radius: 6px; }
.script-text { white-space: pre-wrap; line-height: 1.8; }

.actor-line { margin-bottom: 0.8rem; }
.antagonist-line {
    margin: 0.8rem 0;
    padding-left: 1rem;
    border-left: 3px solid #999;
    font-family: "Comic Sans MS", "Chalkboard SE", cursive;
    color: #333;
}

.voice-label {
    font-size: 0.8rem;
    font-weight: bold;
    color: #555;
    margin-right: 0.5rem;
    font-family: "Comic Sans MS", "Chalkboard SE", cursive;
}

.fire-keeper-section {
    background: #fff8ee; border: 1px solid #e8c97a;
    border-radius: 6px; padding: 1rem 1.2rem;
}
.fk-note { font-size: 0.8rem; color: #888; font-weight: normal; }
.provocations { padding-left: 1.2rem; }
.provocations li { margin-bottom: 0.5rem; }

.download-section { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid #ddd; }
.download-btn.large { padding: 0.6rem 1.4rem; font-size: 1rem; }

.rating-section { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid #ddd; }

.rating-summary { color: #555; font-size: 0.9rem; margin-bottom: 0.5rem; }

.star-row { display: flex; align-items: center; gap: 4px; margin-bottom: 0.5rem; }

.star-label { cursor: pointer; }
.star-label input { display: none; }

.star { font-size: 1.6rem; color: #ddd; transition: color 0.1s; cursor: pointer; }
.star.filled { color: #c47a2a; }
.star-label:hover .star,
.star-label input:checked ~ .star { color: #c47a2a; }

.star-hint { color: #888; font-size: 0.85rem; margin-left: 6px; }

.rating-notes {
    display: block; width: 100%; max-width: 500px;
    height: 60px; margin-bottom: 0.5rem;
    padding: 0.4rem; font-size: 0.9rem;
    border: 1px solid #ccc; border-radius: 4px;
    font-family: Georgia, serif; resize: vertical;
}

.rate-btn {
    padding: 0.3rem 0.9rem; background: #1a3a4a;
    color: #fff; border: none; border-radius: 4px;
    font-size: 0.9rem; cursor: pointer;
}

.rate-btn:hover { background: #c47a2a; }
.rating-msg { color: #666; font-size: 0.9rem; }

/* Print styles - hide nav, buttons, ratings when printing */
@media print {
    /* Hide all navigation and UI elements */
    header,
    .header-left,
    .header-nav,
    .site-title,
    .breadcrumb,
    .download-section,
    .rating-section,
    nav {
        display: none !important;
        visibility: hidden !important;
    }

    body { background: #fff !important; margin: 0; padding: 0.5in; }
    main { margin: 0; padding: 0; max-width: none; }
    .script-detail { max-width: none; }

    /* Remove all highlighting/backgrounds when printing */
    .fire-keeper-section,
    .level-block {
        background: #fff !important;
        border: none !important;
    }

    /* Print Script only - hide fire keeper and field/place sections */
    body.print-script-only .fire-keeper-section { display: none !important; }
    body.print-script-only .field-section { display: none !important; }

    /* Print Fire Keeper only - hide everything except fire keeper */
    body.print-firekeeper-only .script-header,
    body.print-firekeeper-only .field-section,
    body.print-firekeeper-only .character-section,
    body.print-firekeeper-only .levels-section {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        overflow: hidden !important;
    }
}