.tsp { --tsp-panel: #15243a; --tsp-line: #3b506d; --tsp-muted: #b4c5da; --tsp-accent: #9ee4d1; color-scheme: dark; color: #eef5ff; font: 400 .9rem/1.5 Inter, system-ui, sans-serif; }
.tsp *, .tsp *::before, .tsp *::after { box-sizing: border-box; }
.tsp [hidden] { display: none !important; }
.tsp button, .tsp input, .tsp select, .tsp textarea { font: inherit; }
.tsp button { min-height: 39px; padding: .5rem .7rem; border: 1px solid #5a718e; border-radius: 8px; color: #eef5ff; background: #21354e; cursor: pointer; font-weight: 650; }
.tsp button:hover:not(:disabled) { background: #2c4663; border-color: #9bb5d2; }
.tsp button:disabled { opacity: .5; cursor: default; }
.tsp button:focus-visible, .tsp input:focus-visible, .tsp textarea:focus-visible, .tsp select:focus-visible, .tsp summary:focus-visible { outline: 3px solid #f2d079; outline-offset: 3px; }
.tsp .tsp-primary { color: #102e2b; background: var(--tsp-accent); border-color: var(--tsp-accent); }
.tsp .tsp-primary:hover:not(:disabled) { color: #102e2b; background: #c4f3e4; border-color: #c4f3e4; }
.tsp .tsp-danger { color: #ffcab9; }
.tsp input, .tsp textarea, .tsp select { display: block; width: 100%; min-height: 41px; padding: .5rem .65rem; border: 1px solid #5a718e; border-radius: 8px; color: #f4f8ff; background: #101d30; }
.tsp select { appearance: none; -webkit-appearance: none; overflow: hidden; text-overflow: ellipsis; padding-right: 2rem; background: #101d30 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%23cce4f7' stroke-width='2'/%3E%3C/svg%3E") no-repeat right .7rem center / 12px 8px; }
.tsp textarea { min-height: 82px; resize: vertical; }
.tsp input[type="checkbox"] { display: inline-block; width: 18px; min-height: 18px; margin: 0; accent-color: var(--tsp-accent); }
.tsp label { display: grid; align-content: start; gap: .3rem; min-width: 0; font-size: .8rem; font-weight: 650; color: #d0dff0; }
.tsp p { margin: 0; }
.tsp h2, .tsp h3, .tsp h4 { margin: 0; line-height: 1.25; color: #f4f8ff; overflow-wrap: anywhere; }
.tsp h2 { font-size: 1.2rem; }
.tsp h3 { font-size: 1rem; }
.tsp h4 { font-size: .91rem; }
.tsp-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1rem; }
.tsp-heading h2 { font-size: 1.65rem; letter-spacing: -.035em; }
.tsp-kicker { margin-bottom: .25rem !important; color: var(--tsp-accent); font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.tsp-helper { color: var(--tsp-muted); font-size: .77rem; line-height: 1.5; }
.tsp-heading .tsp-helper { max-width: 48rem; margin-top: .4rem; }
.tsp-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.tsp-panel { padding: 1rem; border: 1px solid var(--tsp-line); border-radius: 14px; background: var(--tsp-panel); min-width: 0; }
.tsp-panel-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .6rem; margin-bottom: .85rem; }
.tsp-tools { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; margin: .7rem 0; }
.tsp-tools > label { flex: 1 1 150px; }
.tsp-filter-grid, .tsp-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
.tsp-filter-grid { margin-top: .65rem; }
.tsp-check { display: flex !important; align-items: center; gap: .5rem; margin-top: .65rem; min-height: 31px; }
.tsp-search { margin-bottom: .5rem; }
.tsp-bank-results { display: grid; gap: .6rem; max-height: 640px; overflow: auto; margin: .8rem 0; padding: 2px 4px 4px 2px; overscroll-behavior: contain; }
.tsp-bank-question { border: 1px solid #3b506b; border-radius: 10px; padding: .8rem; background: #102037; }
.tsp-bank-question h3 { font-size: .91rem; line-height: 1.45; }
.tsp-meta { display: flex; flex-wrap: wrap; gap: .3rem .6rem; margin: .4rem 0; color: #b9cfe4; font-size: .69rem; }
.tsp-badge { display: inline-flex; border: 1px solid #56708d; border-radius: 99px; padding: .1rem .5rem; font-size: .67rem; color: #cce4f7; }
.tsp-question-actions { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .65rem; }
.tsp-question-actions button { min-height: 35px; font-size: .75rem; padding: .35rem .55rem; }
.tsp-bank-question-heading { display: flex; gap: .55rem; align-items: flex-start; }
.tsp-bank-question-heading h3 { flex: 1; padding-top: .12rem; }
.tsp-select-question { display: flex !important; align-items: center; justify-content: center; min-height: 28px; min-width: 28px; cursor: pointer; }
.tsp-bank-question:has(input[data-select-question]:checked) { border-color: var(--tsp-accent); background: #153739; }
.tsp-bulk-tools { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; padding: .65rem 0 .25rem; }
.tsp-bulk-tools .tsp-helper { flex: 1 1 100%; }
.tsp-bulk-tools button { min-height: 35px; font-size: .76rem; }
.tsp-media-editor { min-width: 0; display: grid; gap: .65rem; margin: 0; padding: .85rem; border: 1px solid #4d6684; border-radius: 10px; background: #142b42; }
.tsp-media-editor legend { padding: 0 .3rem; font-size: .82rem; font-weight: 750; color: #c8efdf; }
.tsp-media-source { display: grid; gap: .6rem; }
.tsp-media-source .tsp-tools { margin: 0; }
.tsp-media-uploaded { font-size: .77rem; color: #a5e6d0; }
.tsp-media-preview { display: grid; gap: .5rem; min-width: 0; }
.tsp-media-preview img, .tsp-media-preview video { display: block; width: 100%; max-height: 300px; object-fit: contain; background: #07101e; border-radius: 8px; }
.tsp-media-preview audio { display: block; width: 100%; min-width: 0; }
.tsp input[type="file"] { overflow: hidden; font-size: .78rem; }
.tsp-empty { padding: 1.5rem .5rem; color: var(--tsp-muted); text-align: center; font-size: .83rem; }
.tsp-details { margin-top: .8rem; border: 1px solid #425b78; border-radius: 10px; padding: .65rem .75rem; background: #102036; }
.tsp-details summary { cursor: pointer; font-size: .8rem; font-weight: 750; min-height: 25px; }
.tsp-details[open] > :not(summary) { margin-top: .65rem; }
.tsp-quiz-title { margin: .75rem 0; }
.tsp-quiz-mode { margin: .8rem 0 .35rem; }
.tsp-matching-fields { display: grid; gap: .7rem; min-width: 0; }
.tsp-matching-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: .5rem; align-items: end; padding: .65rem; border: 1px solid var(--tsp-line); border-radius: 8px; }
.tsp-matching-row button { max-width: 100%; }
.tsp-matching-preview { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.tsp-matching-preview ol { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; align-content: start; }
.tsp-matching-preview li { padding: .65rem; border: 1px solid var(--tsp-line); border-radius: 8px; overflow-wrap: anywhere; }
.tsp-quiz-question .tsp-double-down { display: flex; align-items: center; gap: .5rem; margin-top: .6rem; }
.tsp-quiz-actions { padding-bottom: .75rem; border-bottom: 1px solid var(--tsp-line); }
.tsp-quiz-actions .tsp-primary { margin-left: auto; }
.tsp-round-toolbar { margin-top: .9rem; }
.tsp-rounds { display: grid; gap: .8rem; margin-top: .85rem; }
.tsp-round { padding: .8rem; border: 1px solid #4d6684; border-radius: 10px; background: #102037; }
.tsp-round-summary { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-bottom: .65rem; }
.tsp-round-summary button { min-width: 90px; }
.tsp-round-heading { display: flex; align-items: center; gap: .4rem; margin-bottom: .65rem; }
.tsp-round-heading label { flex: 1; }
.tsp-order-button { flex: 0 0 auto; min-width: 35px; min-height: 35px !important; padding: .3rem .45rem !important; }
.tsp-quiz-questions { display: grid; gap: .6rem; margin: .7rem 0; padding: 0; list-style: none; }
.tsp-quiz-question { border: 1px solid #354d68; border-radius: 8px; padding: .7rem; background: #182c43; }
.tsp-quiz-question .tsp-tools { margin: .45rem 0 0; }
.tsp-quiz-question .tsp-tools button { font-size: .72rem; min-height: 32px; }
.tsp-quiz-question label { font-size: .7rem; margin-top: .4rem; }
.tsp-quiz-question select { min-height: 33px; font-size: .73rem; padding: .3rem 2rem .3rem .45rem; }
.tsp-quiz-footer { margin-top: .9rem; border-top: 1px solid var(--tsp-line); padding-top: .9rem; }
.tsp-warning { color: #ffdc9a; font-size: .76rem; line-height: 1.5; }
.tsp-notice { padding: .7rem .85rem; border: 1px solid #5d7997; background: #203851; color: #e0ecfa; border-radius: 10px; margin: .7rem 0; font-size: .8rem; overflow-wrap: anywhere; }
.tsp-notice[data-tone="error"] { border-color: #bc8d70; background: #3e2e2d; color: #ffe3d0; }
.tsp-editor, .tsp-preview { width: min(780px, 94vw); max-height: 92dvh; overflow: auto; padding: 1.2rem; border: 1px solid #6e8ba9; border-radius: 14px; color: #f4f8ff; background: #112038; }
.tsp-editor::backdrop, .tsp-preview::backdrop { background: #030b18cf; }
.tsp-editor form { display: grid; gap: .85rem; }
.tsp-dialog-heading { position: sticky; top: -1.2rem; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: .75rem; margin: -1.2rem -1.2rem .9rem; padding: .9rem 1.2rem; border-bottom: 1px solid #425b78; background: #112038; }
.tsp-choice-fields { display: grid; gap: .55rem; }
.tsp-choice-row { display: flex; align-items: end; gap: .5rem; }
.tsp-choice-row label { flex: 1; }
.tsp-correct-order { display: grid; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.tsp-correct-order li { display: flex; align-items: center; gap: .6rem; padding: .6rem; border: 1px solid #4d6684; border-radius: 8px; background: #182c43; }
.tsp-correct-order li > span { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: .85rem; }
.tsp-order-controls { display: flex; flex: 0 0 auto; gap: .35rem; }
.tsp-order-controls button { min-width: 48px; padding-inline: .55rem; }
.tsp-preview-stage { display: grid; gap: 1rem; padding: 1.4rem; border: 1px solid #4e6a89; border-radius: 12px; background: #182e47; }
.tsp-preview-stage h3 { font-size: clamp(1.5rem, 3.4vw, 2.5rem); line-height: 1.3; }
.tsp-preview-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; list-style: none; padding: 0; margin: 0; }
.tsp-preview-choices li { border: 1px solid #7692b0; border-radius: 10px; padding: .85rem; color: #f4f8ff; font-size: 1.2rem; overflow-wrap: anywhere; }
.tsp-preview-footer { display: flex; justify-content: space-between; align-items: center; gap: .6rem; flex-wrap: wrap; margin-top: .9rem; }
@media (max-width: 980px) { .tsp-layout { grid-template-columns: minmax(0, 1fr); } .tsp-bank-results { max-height: 450px; } }
@media (max-width: 520px) { .tsp-matching-row, .tsp-matching-preview { grid-template-columns: minmax(0, 1fr); } .tsp-matching-row button { justify-self: start; } }
@media (max-width: 520px) { .tsp-heading { flex-direction: column; } .tsp-panel { padding: .8rem; } .tsp-form-grid { grid-template-columns: minmax(0, 1fr); } .tsp-filter-grid { gap: .5rem; } .tsp-preview-choices { grid-template-columns: minmax(0, 1fr); } .tsp-editor, .tsp-preview { padding: .9rem; } .tsp-dialog-heading { top: -.9rem; margin: -.9rem -.9rem .9rem; padding: .75rem .9rem; } .tsp button, .tsp input:not([type="checkbox"]), .tsp select { min-height: 44px !important; } .tsp-check, .tsp-select-question { min-height: 44px; min-width: 44px; } .tsp-round-heading { flex-wrap: wrap; } .tsp-round-heading label { flex-basis: 100%; } }
