@charset "utf-8";
@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css");

:root {
    --page: #0c111b;
    --surface: #141b27;
    --surface-raised: #1b2432;
    --surface-soft: #232e3e;
    --text: #f3f6fa;
    --text-subtle: #aeb9c8;
    --border: #334155;
    --brand: #6ee7c7;
    --brand-rgb: 110, 231, 199;
    --brand-contrast: #07120f;
    --warning: #f5cf70;
    --warning-rgb: 245, 207, 112;
    --success: #4ade80;
    --danger: #fb7185;
    --focus: rgba(var(--brand-rgb), .28);
    --shadow: rgba(0, 0, 0, .42);
    --overlay: rgba(3, 7, 14, .78);
    --radius: 10px;
    --radius-lg: 18px;
}

* { box-sizing: border-box; }
html { background: var(--page); color-scheme: dark; }
html[data-theme="white"] { color-scheme: light; }
body {
    margin: 0;
    color: var(--text);
    font-family: "Pretendard Variable", "Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
    line-height: 1.55;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
}

.trpg-board-wrap { width: 100%; max-width: 1280px; margin: 0 auto; color: var(--text); }
.unified-wrapper {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin-bottom: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: 0 18px 48px var(--shadow);
}

.trpg-nav-container {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    overflow-x: auto;
    padding: 16px 20px 0;
    background: var(--surface);
}
.trpg-nav-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 18px;
    border: 1px solid var(--border);
    border-bottom: 0;
    border-radius: 10px 10px 0 0;
    background: var(--surface-soft);
    color: var(--text-subtle);
    font-weight: 700;
    white-space: nowrap;
    transition: background .18s ease, color .18s ease, transform .18s ease;
}
.trpg-nav-item:hover { color: var(--text); background: var(--surface-raised); transform: translateY(-1px); }
.trpg-nav-item.active { color: var(--brand); background: var(--surface-raised); box-shadow: inset 0 3px 0 var(--brand); }

.sc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 15px 20px;
    background: var(--surface-raised);
    border-block: 1px solid var(--border);
}
.sc-header h2 { margin: 0; color: var(--text); font-size: 17px; letter-spacing: -.02em; }
.text-brand { color: var(--brand) !important; }
.text-subtle { color: var(--text-subtle) !important; }
.text-warning { color: var(--warning) !important; }

.sc-input, .sc-select, .sc-textarea {
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
}
.sc-input::placeholder, .sc-textarea::placeholder { color: var(--text-subtle); opacity: .78; }
.sc-input:focus, .sc-select:focus, .sc-textarea:focus { border-color: var(--brand); outline: 3px solid var(--focus); }
.sc-textarea { min-height: 110px; resize: vertical; }

.btn_write, .btn_action, .btn-header, .footer-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 38px;
    padding: 9px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-soft);
    color: var(--text);
    font-weight: 700;
    cursor: pointer;
    transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}
.btn_write, .btn-header { border-color: var(--brand); background: var(--brand); color: var(--brand-contrast); }
.btn_write:hover, .btn-header:hover { transform: translateY(-1px); }
.btn_action:hover, .footer-btn:hover { border-color: var(--brand); color: var(--brand); background: var(--surface-raised); }

.ts-modal-card { width: 420px; max-width: 100%; max-height: 92vh; overflow: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); color: var(--text); box-shadow: 0 24px 70px var(--shadow); }
.ts-modal-head, .ts-modal-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; background: var(--surface-raised); }
.ts-modal-head { border-bottom: 1px solid var(--border); }
.ts-modal-foot { justify-content: flex-end; border-top: 1px solid var(--border); }
.ts-modal-head h3 { display: flex; align-items: center; gap: 9px; margin: 0; color: var(--text); font-size: 17px; }
.ts-modal-body { padding: 22px; }
.ts-modal-close { border: 0; background: transparent; color: var(--text-subtle); font-size: 25px; cursor: pointer; }
.ts-modal-close:hover { color: var(--text); }
.ts-text-input { width: 100%; margin-top: 8px; padding: 11px 13px; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius); }
.ts-save-btn { padding: 10px 22px; border: 1px solid var(--brand); border-radius: var(--radius); background: var(--brand); color: var(--brand-contrast); font-weight: 800; cursor: pointer; }
.ts-save-btn:disabled { opacity: .6; cursor: wait; }
.ts-help { color: var(--text-subtle); font-size: 13px; line-height: 1.6; }

#trpg-loading { background: var(--overlay) !important; }

@media (max-width: 768px) {
    .trpg-nav-container { padding: 10px 10px 0; }
    .trpg-nav-item { padding: 10px 12px; font-size: 12px; }
    .sc-header { padding: 12px 15px; }
    .unified-wrapper { border-radius: 12px; }
}
