* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #eef3f8;
    color: #1d2733;
}
.page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 18px;
}
h1 {
    margin: 0 0 12px;
    text-align: center;
    color: #1f3d5a;
}
a { color: #245a8d; }
.box, .selector-box, .structure-box, .writing-box {
    background: white;
    border: 1px solid #cbd6e2;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.category-grid, .prompt-list {
    display: grid;
    gap: 12px;
}
.category-grid {
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}
.category-card, .prompt-card-link {
    display: block;
    text-decoration: none;
    color: #1d2733;
    background: #fbfdff;
    border: 1px solid #d8e1eb;
    border-radius: 10px;
    padding: 14px;
}
.category-card:hover, .prompt-card-link:hover {
    border-color: #2f648f;
    background: #f0f7ff;
}
.category-card strong, .prompt-card-link strong {
    color: #244b70;
    font-size: 18px;
}
label {
    display: block;
    font-weight: bold;
    margin-bottom: 6px;
}
textarea, button {
    width: 100%;
    font-size: 16px;
    border-radius: 8px;
    border: 1px solid #aebccc;
    padding: 10px;
}
button {
    border: none;
    background: #245a8d;
    color: white;
    font-weight: bold;
    cursor: pointer;
    padding: 12px 18px;
}
button:hover { background: #183f66; }
.selected-prompt {
    margin-top: 14px;
    padding: 14px;
    background: #fff8dc;
    border-left: 6px solid #e2b441;
    border-radius: 8px;
    font-size: 18px;
    line-height: 1.45;
}
.category-note, .small-info {
    color: #617181;
    font-size: 14px;
}
.structure-header, .write-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.structure-scroll {
    max-height: 45vh;
    overflow: auto;
    padding-right: 6px;
}
.paragraph-card {
    border: 1px solid #d8e1eb;
    border-radius: 10px;
    margin: 12px 0;
    overflow: hidden;
}
.paragraph-title {
    background: #2f648f;
    color: white;
    padding: 10px 12px;
    font-weight: bold;
}
.paragraph-body {
    padding: 12px;
    background: #fbfdff;
}
.purpose { margin: 0 0 10px; }
.example {
    background: #f4f7fb;
    border-left: 4px solid #6f9fca;
    padding: 10px;
    margin: 10px 0;
    border-radius: 6px;
}
.sub-list {
    margin: 10px 0 0;
    padding: 0;
    list-style: none;
}
.sub-list li {
    padding: 8px 10px;
    margin-bottom: 7px;
    background: white;
    border: 1px solid #e0e6ee;
    border-radius: 8px;
}
.sub-list strong { color: #244b70; }
.sub-example {
    display: block;
    margin-top: 5px;
    color: #4d5d6c;
    font-style: italic;
}
textarea {
    min-height: 360px;
    resize: vertical;
    line-height: 1.5;
    font-family: Arial, Helvetica, sans-serif;
}
.actions {
    display: grid;
    grid-template-columns: 1fr 220px;
    gap: 12px;
    align-items: center;
    margin-top: 12px;
}
.top-nav {
    margin-bottom: 12px;
}
@media (max-width: 800px) {
    .actions { grid-template-columns: 1fr; }
    .structure-scroll { max-height: none; }
}
input, select {
    width: 100%;
    font-size: 16px;
    border-radius: 8px;
    border: 1px solid #aebccc;
    padding: 10px;
    margin-bottom: 12px;
}
.form-box { max-width: 520px; margin-left: auto; margin-right: auto; }
.center-box { text-align: center; max-width: 760px; margin-left: auto; margin-right: auto; }
.error-box { background:#ffe8e8; border-left:6px solid #a11; padding:10px; border-radius:8px; margin-bottom:12px; }
.join-code { font-size:32px; font-weight:bold; letter-spacing:2px; background:#fff8dc; border:2px dashed #d4a62a; border-radius:12px; padding:16px; text-align:center; margin:10px 0; }
.button-row{display:flex;gap:10px;flex-wrap:wrap;margin-top:12px}.button-link{display:inline-block;background:#245a8d;color:white;text-decoration:none;font-weight:bold;border-radius:8px;padding:11px 16px}.button-link.secondary{background:#526171}
.dash-table{width:100%;border-collapse:collapse;background:white}.dash-table th,.dash-table td{border:1px solid #d8e1eb;padding:9px;vertical-align:top}.dash-table th{background:#2f648f;color:white;text-align:left}
.small-button{display:inline-block;background:#245a8d;color:white;text-decoration:none;font-weight:bold;border-radius:8px;padding:6px 10px;font-size:14px}.small-button:hover{background:#183f66}.dash-table a{font-weight:bold;color:#245a8d}.dash-table a.small-button{color:white}
.badge{display:inline-block;padding:4px 8px;border-radius:999px;background:#e8f1fb;border:1px solid #bdd0e6;font-size:13px}.warning{background:#fff4d6;border-left:5px solid #d69922;padding:12px;border-radius:8px}.success{background:#e9f8ec;border-left:5px solid #2d8a43;padding:12px;border-radius:8px}.grid2{display:grid;grid-template-columns:1fr 1fr;gap:14px}.grid3{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}.button-row{display:flex;gap:8px;flex-wrap:wrap}.print-only{display:none}@media(max-width:800px){.grid2,.grid3{grid-template-columns:1fr}}@media print{.no-print{display:none!important}.print-only{display:block}body{background:white}.box,.selector-box,.structure-box,.writing-box{box-shadow:none;border:1px solid #999}}
