/* Interaktivní tabule */

body.tabule-page {
    overflow: hidden;
    height: 100dvh;
    background: #f6f3ec;
}

body.tabule-page footer {
    display: none !important;
}

body.tabule-page .main-wrapper {
    height: 100dvh;
    min-height: 0;
    padding-bottom: 0;
    overflow: hidden;
}

body.tabule-present {
    --site-top-offset: 0px;
    overflow: hidden;
}

body.tabule-present .site-top,
body.tabule-present #test-mode-banner,
body.tabule-present footer,
body.tabule-present #nl-bottom-stack {
    display: none !important;
}

body.tabule-present .main-wrapper {
    padding-top: 0;
}

body.tabule-present .tabule-shell {
    position: fixed;
    inset: 0;
    z-index: 80;
    width: 100%;
    height: 100dvh;
}

.tabule-shell {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(900px 420px at 0% -10%, rgba(212, 175, 55, 0.16), transparent 55%),
        #f6f3ec;
    color: #0f172a;
}

.tb-alert {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 0.5rem 0.75rem 0;
    padding: 0.55rem 0.8rem;
    border-radius: 0.9rem;
    background: #fffbeb;
    border: 1px solid rgba(217, 119, 6, 0.25);
    color: #92400e;
    font-size: 0.875rem;
}

.tb-alert a {
    color: #b45309;
    font-weight: 700;
    text-decoration: underline;
}

.tb-bar {
    position: relative;
    flex: 0 0 auto;
    min-width: 0;
    max-width: 100%;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
    z-index: 6;
}

.tb-bar-main,
.tb-format {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    min-width: 0;
    padding: 0.35rem 0.55rem;
}

.tb-format {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 2;
    flex-wrap: nowrap;
    align-items: center;
    box-sizing: border-box;
    height: 3.25rem;
    max-height: 3.25rem;
    min-height: 0;
    padding: 0 0.45rem;
    border-top: 1px solid rgba(15, 23, 42, 0.05);
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    background: #fffdf8;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.tb-format::-webkit-scrollbar {
    display: none;
    height: 0;
}

.tb-format > * {
    flex: 0 0 auto;
}

.tb-format[hidden] {
    display: none !important;
}

.tb-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 44px;
    padding-right: 0.2rem;
    flex: 0 0 auto;
    text-decoration: none;
    color: inherit;
}

.tb-brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 0.8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(145deg, #334155, #b8962e);
    box-shadow: 0 6px 16px rgba(184, 150, 46, 0.28);
}

.tb-brand strong {
    font-size: 0.95rem;
    letter-spacing: -0.02em;
}

.tb-fs-logo {
    display: none;
    height: 36px;
    width: auto;
    max-width: 9.5rem;
    object-fit: contain;
}

body.tabule-present .tb-fs-logo {
    display: block;
}

body.tabule-present .tb-brand-mark,
body.tabule-present .tb-brand strong {
    display: none;
}

.tb-title {
    flex: 1 1 6rem;
    min-width: 0;
    max-width: 14rem;
    height: 44px;
    border: 1px solid transparent;
    border-radius: 0.8rem;
    background: transparent;
    padding: 0 0.7rem;
    font: inherit;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: #0f172a;
}

.tb-title:focus {
    outline: none;
    background: #fff;
    border-color: rgba(212, 175, 55, 0.7);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.18);
}

.tb-tools,
.tb-actions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    min-width: 0;
}

.tb-tools {
    flex: 0 1 auto;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.tb-tools::-webkit-scrollbar {
    display: none;
}

.tb-actions {
    flex: 0 0 auto;
}

.tb-btn,
.tb-icon-btn {
    flex: 0 0 auto;
    min-width: 44px;
    min-height: 44px;
    border: 1px solid transparent;
    border-radius: 0.8rem;
    background: transparent;
    color: #334155;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0 0.7rem;
    font: inherit;
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.tb-icon-btn {
    padding: 0;
    width: 44px;
}

.tb-btn:hover,
.tb-icon-btn:hover,
.tb-btn.is-on,
.tb-icon-btn.is-on {
    background: #fff7e6;
    border-color: rgba(212, 175, 55, 0.45);
    color: #8a6d1d;
}

.tb-btn-primary {
    background: linear-gradient(180deg, #e4c56a, #b8962e);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 8px 16px rgba(184, 150, 46, 0.28);
}

.tb-btn.tb-btn-primary:hover,
.tb-btn.tb-btn-primary:focus-visible {
    background: linear-gradient(180deg, #c9a227, #8f7020);
    color: #fff;
    border-color: transparent;
    filter: none;
}

.tb-sep {
    width: 1px;
    height: 22px;
    background: rgba(15, 23, 42, 0.1);
    flex: 0 0 auto;
    margin: 0 0.15rem;
}

.tb-pen-options {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    flex: 0 0 auto;
}

.tb-swatch,
.tb-width {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    border-radius: 999px;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.15);
    padding: 0;
    cursor: pointer;
}

.tb-swatch.is-on,
.tb-width.is-on {
    box-shadow: 0 0 0 2px #d4af37;
}

.tb-width {
    background: #fff;
    color: #334155;
    font-size: 0.7rem;
    font-weight: 800;
}

.tb-status {
    flex: 0 0 auto;
    font-size: 0.75rem;
    color: #64748b;
    padding: 0 0.35rem;
    white-space: nowrap;
}

.tb-login-link {
    flex: 0 0 auto;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 0 0.55rem;
    color: #b45309;
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
}

.tb-stage {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    min-width: 0;
}

.tb-viewport {
    position: absolute;
    inset: 0;
    overflow: hidden;
    touch-action: none;
    background-color: transparent;
    background-image: radial-gradient(circle, rgba(148, 132, 99, 0.38) 1.1px, transparent 1.2px);
    background-size: 28px 28px;
    cursor: crosshair;
}

.tabule-shell[data-tool="select"] .tb-viewport { cursor: default; }
.tabule-shell[data-tool="select"][data-ctrl="1"] .tb-viewport { cursor: grab; }
.tabule-shell.is-marquee .tb-viewport { cursor: crosshair; }
.tabule-shell[data-tool="hand"] .tb-viewport,
.tabule-shell[data-space="1"] .tb-viewport { cursor: grab; }
.tabule-shell[data-tool="text"] .tb-viewport,
.tabule-shell[data-tool="outline"] .tb-viewport { cursor: text; }
.tabule-shell[data-tool="link"] .tb-viewport,
.tabule-shell[data-tool="youtube"] .tb-viewport { cursor: copy; }
.tabule-shell[data-tool="eraser"] .tb-viewport { cursor: cell; }
.tabule-shell[data-tool="pen"] .tb-item:not(.is-max),
.tabule-shell[data-tool="pen"] .tb-item:not(.is-max) * {
    pointer-events: none !important;
}
.tabule-shell[data-shape="1"] .tb-viewport { cursor: crosshair; }
.tabule-shell.is-panning .tb-viewport { cursor: grabbing; }

.tb-world {
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 0;
    overflow: visible;
    transform-origin: 0 0;
}

.tb-svg {
    position: absolute;
    left: 0;
    top: 0;
    width: 1px;
    height: 1px;
    overflow: visible;
    pointer-events: none;
}

#tb-svg {
    z-index: 1000000;
}

.tb-stroke-svg polyline,
.tb-shape-svg line,
.tb-shape-svg ellipse,
.tb-shape-svg polygon,
.tb-shape-svg polyline,
.tb-shape-svg rect {
    pointer-events: stroke;
}

.tb-shape-svg polygon {
    pointer-events: visiblePainted;
}

.tb-stroke-svg circle {
    pointer-events: fill;
}

.tb-shape-svg .tb-shape-box,
.tb-shape-svg .tb-shape-stem {
    pointer-events: none;
}

.tb-stroke-svg.is-selected {
    filter: drop-shadow(0 0 1.5px #d4af37) drop-shadow(0 0 1.5px #d4af37);
}

.tb-marquee {
    position: absolute;
    z-index: 40;
    border: 1.5px solid #d4af37;
    background: rgba(212, 175, 55, 0.16);
    border-radius: 4px;
    pointer-events: none;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.7);
}

.tb-ink-frame {
    position: absolute;
    box-sizing: border-box;
    border: 1.5px solid #d4af37;
    border-radius: 12px;
    background: rgba(212, 175, 55, 0.08);
    pointer-events: none;
    box-shadow: 0 10px 24px rgba(184, 150, 46, 0.12);
}

.tabule-shell.is-nudging .tb-viewport { cursor: grabbing; }

.tb-shape-box {
    fill: none;
    stroke: #d4af37;
    pointer-events: none;
}

.tb-shape-handle,
.tb-shape-rotate {
    fill: #fff;
    stroke: #d4af37;
    pointer-events: auto;
}

.tb-shape-stem {
    stroke: #d4af37;
    pointer-events: none;
}

.tb-shape-glyph {
    width: 22px;
    height: 22px;
    display: block;
    overflow: visible;
}

.tb-shape-glyph * {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linejoin: round;
    stroke-linecap: round;
}

.tb-shape-glyph .tb-glyph-fill {
    fill: currentColor;
    stroke: none;
}

.tb-shape-pop {
    position: fixed;
    z-index: 35;
    box-sizing: border-box;
    width: min(22.5rem, calc(100vw - 1rem));
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.35rem;
    padding: 0.55rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.85);
    border-radius: 1.15rem;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.16);
}

.tb-shape-pop[hidden] {
    display: none !important;
}

.tb-layer-menu {
    position: fixed;
    z-index: 1050;
    box-sizing: border-box;
    width: min(16.5rem, calc(100vw - 1rem));
    padding: 0.35rem;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 1rem;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.16);
}

.tb-layer-menu[hidden] {
    display: none !important;
}

.tb-layer-name {
    margin: 0.15rem 0.7rem 0.25rem;
    color: #94a3b8;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.tb-layer-menu button {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    min-height: 44px;
    padding: 0 0.7rem;
    border: 0;
    border-radius: 0.7rem;
    background: transparent;
    color: #0f172a;
    font: inherit;
    font-size: 0.92rem;
    font-weight: 650;
    text-align: left;
    cursor: pointer;
}

.tb-layer-menu button i {
    width: 1.15rem;
    color: #b8962e;
    text-align: center;
}

.tb-layer-menu button:hover:not(:disabled),
.tb-layer-menu button:focus-visible:not(:disabled) {
    background: #fffbeb;
    color: #b8962e;
    outline: none;
}

.tb-layer-menu button:disabled {
    opacity: 0.38;
    cursor: default;
}

.tb-layer-rule {
    height: 1px;
    margin: 0.25rem 0.45rem;
    background: rgba(15, 23, 42, 0.08);
}

.tb-shape-choice {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    min-height: 64px;
    padding: 0.35rem 0.2rem;
    border: 1px solid transparent;
    border-radius: 0.85rem;
    background: transparent;
    color: #334155;
    font: inherit;
    font-size: 0.68rem;
    font-weight: 600;
    line-height: 1.15;
    text-align: center;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.tb-shape-choice span {
    max-width: 100%;
}

.tb-shape-choice:hover,
.tb-shape-choice.is-on {
    background: #fffbeb;
    border-color: #d4af37;
    color: #b8962e;
}

.tb-hint {
    position: absolute;
    left: 50%;
    top: 42%;
    transform: translate(-50%, -50%);
    width: min(28rem, calc(100% - 2rem));
    text-align: center;
    pointer-events: none;
    color: #64748b;
}

.tb-hint-card {
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 1.4rem;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
    padding: 1.25rem 1.2rem;
    backdrop-filter: blur(8px);
}

.tb-hint h2 {
    margin: 0.35rem 0 0.25rem;
    font-size: 1.25rem;
    letter-spacing: -0.03em;
    color: #0f172a;
}

.tb-hint p {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.45;
}

.tb-item {
    position: absolute;
    box-sizing: border-box;
    min-width: 160px;
    user-select: none;
    cursor: grab;
}

.tb-item:active { cursor: grabbing; }

.tb-text,
.tb-link,
.tb-time,
.tb-image {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 1rem;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.tb-image {
    display: flex;
    flex-direction: column;
    overflow: visible;
}

.tb-image-frame {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    border-radius: 1rem 1rem 0 0;
    background:
        radial-gradient(circle at 20% 0%, rgba(212, 175, 55, 0.16), transparent 42%),
        linear-gradient(180deg, #f8fafc, #fff);
}

.tb-image:not(:has(.tb-image-credit)) .tb-image-frame {
    border-radius: 1rem;
}

.tb-image-shot {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
}

.tb-image-credit {
    flex: 0 0 auto;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    padding: 0.4rem 0.7rem 0.45rem;
    border-top: 1px solid #e2e8f0;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.35;
    color: #334155;
    text-decoration: none;
    background: #f8fafc;
    border-radius: 0 0 1rem 1rem;
}

a.tb-image-credit:hover,
a.tb-image-credit:focus-visible {
    color: #0f172a;
    text-decoration: underline;
}

.tb-image-grid {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    max-height: 16rem;
    overflow-y: auto;
    overscroll-behavior: contain;
    margin-bottom: 0.7rem;
}

.tb-image-grid[aria-busy="true"] {
    opacity: 0.55;
    pointer-events: none;
}

.tb-image-hit {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    min-height: 64px;
    padding: 0.35rem 0.5rem;
    border-radius: 0.9rem;
    border: 1px solid #e2e8f0;
    background: #fff;
    text-align: left;
    cursor: pointer;
    font: inherit;
    color: inherit;
}

.tb-image-hit img {
    width: 72px;
    height: 52px;
    object-fit: cover;
    border-radius: 0.6rem;
    background: #f1f5f9 center / 22px 22px no-repeat;
    flex: 0 0 auto;
}

.tb-image-hover {
    position: fixed;
    z-index: 1300;
    width: min(17rem, calc(100vw - 1rem));
    padding: 0.45rem;
    border-radius: 1rem;
    border: 1px solid rgba(212, 175, 55, 0.45);
    background: #fff;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.22);
    pointer-events: none;
}

.tb-image-hover[hidden] {
    display: none;
}

.tb-image-hover img {
    display: block;
    width: 100%;
    height: 11rem;
    object-fit: contain;
    border-radius: 0.75rem;
    background:
        radial-gradient(circle at 20% 0%, rgba(212, 175, 55, 0.16), transparent 42%),
        #f8fafc;
}

.tb-image-hover b,
.tb-image-hover small {
    display: block;
    padding: 0.35rem 0.35rem 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tb-image-hover b {
    font-size: 0.84rem;
    color: #0f172a;
}

.tb-image-hover small {
    padding-top: 0.1rem;
    font-size: 0.72rem;
    color: #64748b;
}

.tb-image-ask {
    position: fixed;
    z-index: 1300;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    box-sizing: border-box;
    width: min(100% - 1.5rem, 22rem);
    max-height: calc(100dvh - 2rem);
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding: 1rem;
    border-radius: 1.25rem;
    border: 1px solid rgba(212, 175, 55, 0.35);
    background: #fff;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
    overflow: auto;
}

.tb-image-ask[hidden] {
    display: none;
}

.tb-image-ask img {
    display: block;
    width: 100%;
    height: min(14rem, 42dvh);
    object-fit: contain;
    border-radius: 0.9rem;
    background:
        radial-gradient(circle at 20% 0%, rgba(212, 175, 55, 0.16), transparent 42%),
        #f8fafc;
}

.tb-image-ask b {
    font-size: 0.95rem;
    letter-spacing: -0.02em;
    color: #0f172a;
}

.tb-image-ask small,
.tb-image-ask p {
    margin: 0;
    color: #64748b;
    font-size: 0.8rem;
    line-height: 1.35;
}

.tb-image-ask .tb-btn {
    width: 100%;
    min-height: 44px;
}

.tb-image-hit span {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.tb-image-hit b {
    font-size: 0.84rem;
    letter-spacing: -0.02em;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tb-image-hit small {
    color: #64748b;
    font-size: 0.72rem;
    line-height: 1.3;
}

#tb-yt-list:empty {
    display: none;
}

.tb-image-hit.is-on,
.tb-image-hit:hover,
.tb-image-hit:focus-visible {
    border-color: rgba(212, 175, 55, 0.8);
    background: rgba(212, 175, 55, 0.08);
}

#tb-dlg-output .tb-btn:disabled {
    opacity: 0.45;
    cursor: default;
    box-shadow: none;
}

#tb-dlg-output .tb-dialog,
#tb-dlg-quiz .tb-dialog,
#tb-dlg-birds .tb-dialog,
#tb-dlg-image .tb-dialog,
#tb-dlg-youtube .tb-dialog {
    box-sizing: border-box;
    width: min(100% - 1.5rem, 26rem);
    max-width: 26rem;
    max-height: calc(100dvh - 1.5rem);
    overflow-y: auto;
}

#tb-dlg-brief .tb-dialog {
    box-sizing: border-box;
    width: min(100% - 1.5rem, 40rem);
    max-width: 40rem;
    max-height: calc(100dvh - 1.5rem);
    overflow: hidden;
}

#tb-dlg-brief .tb-save-head p {
    margin-bottom: 0;
}

#tb-brief-body {
    max-height: calc(100dvh - 11rem);
    margin: 0.35rem 0 0.75rem;
    overflow-y: auto;
    overscroll-behavior: contain;
    color: #334155;
    font-size: 0.98rem;
    line-height: 1.55;
}

#tb-brief-body p,
#tb-brief-body li {
    margin: 0.4rem 0;
    color: #334155;
    font-size: 0.98rem;
    line-height: 1.55;
}

#tb-brief-body h1,
#tb-brief-body h2,
#tb-brief-body h3 {
    margin: 0.85rem 0 0.35rem;
    color: #0f172a;
    letter-spacing: -0.03em;
    line-height: 1.25;
}

#tb-brief-body h1 { font-size: 1.35rem; }
#tb-brief-body h2 { font-size: 1.2rem; }
#tb-brief-body h3 { font-size: 1.05rem; }

#tb-brief-body ul,
#tb-brief-body ol {
    margin: 0.35rem 0 0.35rem 1.25rem;
    padding: 0;
}

#tb-brief-body blockquote {
    margin: 0.6rem 0;
    padding-left: 0.75rem;
    border-left: 3px solid #d4af37;
    color: #475569;
}

#tb-brief-body a {
    color: #2563eb;
    font-weight: 650;
    text-decoration: underline;
}

#tb-brief-body img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0.75rem 0;
    border-radius: 0.75rem;
}

#tb-brief-body table {
    width: 100%;
    margin: 0.75rem 0;
    border-collapse: collapse;
}

#tb-brief-body td,
#tb-brief-body th {
    border: 1px solid #e2e8f0;
    padding: 0.35rem 0.55rem;
    text-align: left;
    vertical-align: top;
}

#tb-brief-body .ql-align-center { text-align: center; }
#tb-brief-body .ql-align-right { text-align: right; }
#tb-brief-body .ql-align-justify { text-align: justify; }
#tb-brief-body .ql-indent-1 { padding-left: 1.5rem; }
#tb-brief-body .ql-indent-2 { padding-left: 3rem; }
#tb-brief-body .ql-indent-3 { padding-left: 4.5rem; }
#tb-brief-body .ql-indent-4 { padding-left: 6rem; }
#tb-brief-body .ql-indent-5 { padding-left: 7.5rem; }
#tb-brief-body .ql-indent-6 { padding-left: 9rem; }
#tb-brief-body .ql-indent-7 { padding-left: 10.5rem; }
#tb-brief-body .ql-indent-8 { padding-left: 12rem; }

.tb-brief-video {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    margin: 0.75rem 0;
    overflow: hidden;
    border-radius: 0.75rem;
    background: #0f172a;
}

.tb-brief-video iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

#tb-output-subject-wrap {
    margin-bottom: 0.65rem;
}

#tb-output-subject-wrap[hidden] {
    display: none !important;
}

.tb-output-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    max-height: 14rem;
    overflow-y: auto;
    overscroll-behavior: contain;
    margin-bottom: 0.7rem;
}

.tb-output-pick {
    width: 100%;
    min-height: 44px;
    border-radius: 0.9rem;
    border: 1px solid #e2e8f0;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
    padding: 0.45rem 0.7rem;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.tb-output-pick b {
    font-size: 0.9rem;
    letter-spacing: -0.02em;
    color: #0f172a;
}

.tb-output-pick small {
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 600;
}

.tb-output-pick.is-on {
    border-color: #d4af37;
    background: #fffbeb;
    box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.35);
}

.tb-output-pick:disabled {
    opacity: 0.55;
    cursor: default;
}

.tb-birds-body audio {
    display: block;
    width: 100%;
    margin-top: 0.7rem;
}

.tb-birds-progress,
.tb-birds-ask {
    margin: 0.55rem 0 0;
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 700;
}

.tb-birds-mark {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    margin: 0.65rem 0 0;
    padding: 0 0.7rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 750;
}

.tb-birds-mark.is-ok {
    background: #ecfdf5;
    color: #047857;
}

.tb-birds-mark.is-no {
    background: #fff1f2;
    color: #be123c;
}

.tb-birds-name,
.tb-birds-score {
    margin: 0.45rem 0 0;
    color: #0f172a;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.tb-birds-name { font-size: 1.2rem; }
.tb-birds-score { font-size: 1.7rem; }

.tb-birds-body img {
    display: block;
    width: 100%;
    max-height: 9rem;
    margin-top: 0.55rem;
    object-fit: cover;
    border-radius: 0.9rem;
    background: #f8fafc;
}

.tb-birds-act {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 44px;
    margin-top: 0.4rem;
    padding: 0.45rem 0.75rem;
    border-radius: 0.8rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #fff;
    color: #0f172a;
    font: inherit;
    font-size: 0.92rem;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}

.tb-birds-act:hover {
    border-color: #d4af37;
    background: #fffaf0;
}

.tb-birds-go,
.tb-birds-act[data-act="next"],
.tb-birds-act[data-act="again"] {
    justify-content: center;
    text-align: center;
    border-color: transparent;
    background: linear-gradient(180deg, #e4c56a, #b8962e);
    color: #fff;
    box-shadow: 0 8px 16px rgba(184, 150, 46, 0.28);
}

.tb-output-opts {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 0.75rem;
}

.tb-output-opt {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-height: 44px;
    border: 1px solid #e2e8f0;
    border-radius: 0.9rem;
    padding: 0.35rem 0.7rem;
    background: #fff;
    cursor: pointer;
}

.tb-output-opt input {
    width: 1.05rem;
    height: 1.05rem;
    accent-color: #b8962e;
    flex: 0 0 auto;
}

.tb-output-opt span {
    display: flex;
    flex-direction: column;
    min-width: 0;
    font-weight: 750;
    color: #0f172a;
}

.tb-output-opt small {
    font-weight: 550;
    color: #64748b;
    font-size: 0.75rem;
}

.tb-output-opt:has(input:checked) {
    border-color: #d4af37;
    background: linear-gradient(180deg, #fffdf6, #fff);
    box-shadow: 0 6px 16px rgba(184, 150, 46, 0.08);
}

.tb-aq {
    background: linear-gradient(180deg, #fffdf8 0%, #fff 42%);
    border: 1px solid rgba(212, 175, 55, 0.45);
    border-radius: 1.15rem;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
    padding: 0.75rem 0.8rem 0.7rem;
    overflow: visible;
}

.tb-aq::before {
    content: "";
    display: block;
    height: 4px;
    margin: -0.75rem -0.8rem 0.65rem;
    border-radius: 1.15rem 1.15rem 0 0;
    background: linear-gradient(90deg, #e4c56a, #b8962e);
}

.tb-aq-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin: 0 1.5rem 0.15rem 0;
}

.tb-aq-kicker {
    color: #8a7020;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.tb-aq-count {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 700;
}

.tb-aq-title {
    margin: 0 0 0.55rem;
    color: #0f172a;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.25;
}

.tb-aq-row {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    min-width: 0;
}

.tb-aq-qr {
    flex: none;
    width: 7.2rem;
    padding: 0.35rem;
    border-radius: 0.85rem;
    background: #fff;
    border: 1px solid rgba(212, 175, 55, 0.35);
    line-height: 0;
}

.tb-aq-qr[hidden] {
    display: none !important;
}

.tb-aq-qr img,
.tb-aq-qr canvas {
    display: block;
    width: 100% !important;
    height: auto !important;
}

.tb-aq-main {
    min-width: 0;
    flex: 1 1 auto;
}

.tb-aq-code {
    margin: 0;
    font-family: Outfit, system-ui, sans-serif;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.12em;
    font-size: 1.65rem;
    line-height: 1;
    color: #b8962e;
}

.tb-aq-q {
    margin: 0.4rem 0 0;
    color: #334155;
    font-size: 0.92rem;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tb-aq-q.is-on {
    margin-top: 0.45rem;
    color: #0f172a;
    font-weight: 700;
    letter-spacing: -0.03em;
    font-size: 1.65rem;
    line-height: 1.2;
    -webkit-line-clamp: 6;
}

.tb-aq.is-ended .tb-aq-code {
    color: #94a3b8;
}

.tb-aq-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.7rem;
}

.tb-aq-actions[hidden] {
    display: none !important;
}

.tb-aq-act {
    flex: 1 1 calc(50% - 0.35rem);
    min-height: 44px;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.3rem 0.45rem;
    border-radius: 0.8rem;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #334155;
    font: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
}

.tb-aq-act.is-primary {
    border-color: transparent;
    background: linear-gradient(180deg, #e4c56a, #b8962e);
    color: #fff;
    box-shadow: 0 8px 16px rgba(184, 150, 46, 0.28);
}

.tb-aq-act:disabled {
    opacity: 0.45;
    cursor: default;
    box-shadow: none;
}

.tb-rz-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-top: 0.55rem;
}

.tb-rz-pick {
    width: 100%;
    min-height: 44px;
    border-radius: 0.9rem;
    border: 1px solid #e2e8f0;
    background: #fff;
    text-align: left;
    padding: 0.45rem 0.7rem;
    font: inherit;
    cursor: pointer;
}

.tb-rz-pick b {
    display: block;
    color: #0f172a;
    font-size: 0.9rem;
}

.tb-rz-pick small {
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 600;
}

.tb-rz-pick.is-on,
.tb-rz-pick:hover {
    border-color: #d4af37;
    background: #fffbeb;
}

.tb-rz-qcard {
    border: 1px solid #e2e8f0;
    border-radius: 0.9rem;
    background: #fff;
    padding: 0.55rem;
    margin-bottom: 0.45rem;
}

.tb-rz-qhead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
    margin-bottom: 0.35rem;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #b8962e;
}

.tb-rz-qcard textarea,
.tb-rz-qcard select,
.tb-rz-qcard input[type="text"],
.tb-rz-qcard input[type="number"] {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    min-height: 44px;
    margin-top: 0.35rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 0.4rem 0.6rem;
    font: inherit;
    background: #fff;
}

.tb-rz-qcard textarea {
    min-height: 4.2rem;
    resize: vertical;
}

.tb-rz,
.tb-aq {
    box-sizing: border-box;
}

.tb-rz {
    background: linear-gradient(180deg, #fffdf8 0%, #fff 42%);
    border: 1px solid rgba(212, 175, 55, 0.45);
    border-radius: 1.15rem;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
    padding: 0.75rem 0.8rem 0.7rem;
    overflow: visible;
}

.tb-rz::before {
    content: "";
    display: block;
    height: 4px;
    margin: -0.75rem -0.8rem 0.65rem;
    border-radius: 1.15rem 1.15rem 0 0;
    background: linear-gradient(90deg, #e4c56a, #b8962e);
}

.tb-rz-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin: 0 1.5rem 0.15rem 0;
}

.tb-rz-kicker {
    color: #8a7020;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.tb-rz-count {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 700;
}

.tb-rz-title {
    margin: 0 0 0.2rem;
    color: #0f172a;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.25;
}

.tb-rz-step {
    margin: 0 0 0.45rem;
    color: #94a3b8;
    font-size: 0.75rem;
    font-weight: 700;
}

.tb-rz-row {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    min-width: 0;
}

.tb-rz-qr {
    flex: none;
    width: 7.2rem;
    padding: 0.35rem;
    border-radius: 0.85rem;
    background: #fff;
    border: 1px solid rgba(212, 175, 55, 0.35);
    line-height: 0;
}

.tb-rz-qr[hidden] { display: none !important; }

.tb-rz-qr img,
.tb-rz-qr canvas {
    display: block;
    width: 100% !important;
    height: auto !important;
}

.tb-rz-main { min-width: 0; flex: 1 1 auto; }

.tb-rz-code {
    margin: 0;
    font-family: Outfit, system-ui, sans-serif;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.12em;
    font-size: 1.65rem;
    line-height: 1;
    color: #b8962e;
}

.tb-rz-copy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    width: 100%;
    margin-top: 0.45rem;
    min-height: 44px;
    padding: 0.25rem 0.65rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(212, 175, 55, 0.45);
    background: #fff;
    color: #8a7020;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
}

.tb-rz-copy:hover,
.tb-rz-copy:focus-visible {
    border-color: #d4af37;
    background: #fffdf6;
}

.tb-rz-copy.is-done {
    color: #047857;
    border-color: #a7f3d0;
    background: #ecfdf5;
}

.tb-rz-copy[hidden] { display: none !important; }

.tb-rz-q {
    margin: 0.45rem 0 0;
    color: #334155;
    font-size: 0.92rem;
    line-height: 1.35;
}

.tb-rz-q.is-on {
    color: #0f172a;
    font-weight: 700;
    letter-spacing: -0.03em;
    font-size: 1.65rem;
    line-height: 1.2;
}

.tb-rz.is-ended .tb-rz-code { color: #94a3b8; }

.tb-rz-results {
    margin-top: 0.55rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.tb-rz-opt,
.tb-rz-line {
    width: 100%;
}

.tb-rz-opt {
    position: relative;
    overflow: hidden;
    border-radius: 0.65rem;
    background: #f8fafc;
    min-height: 32px;
    padding: 0.3rem 0.5rem;
    display: flex;
    justify-content: space-between;
    gap: 0.4rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: #0f172a;
}

.tb-rz-opt i {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    background: rgba(212, 175, 55, 0.35);
}

.tb-rz-opt span,
.tb-rz-opt b { position: relative; z-index: 1; }

.tb-rz-word {
    display: inline-flex;
    align-items: center;
    line-height: 1.15;
    padding: 0.1rem 0.15rem;
    color: #0f172a;
    font-size: 0.85rem;
    font-weight: 600;
}

.tb-rz-line {
    margin: 0;
    color: #334155;
    font-size: 0.85rem;
    line-height: 1.35;
}

.tb-rz-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.7rem;
}

.tb-rz-actions[hidden] { display: none !important; }

.tb-rz-act {
    flex: 1 1 calc(33% - 0.35rem);
    min-height: 44px;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.3rem 0.4rem;
    border-radius: 0.8rem;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #334155;
    font: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
}

.tb-rz-act.is-primary {
    border-color: transparent;
    background: linear-gradient(180deg, #e4c56a, #b8962e);
    color: #fff;
    box-shadow: 0 8px 16px rgba(184, 150, 46, 0.28);
}

.tb-rz-act:disabled {
    opacity: 0.45;
    cursor: default;
    box-shadow: none;
}

.tb-output,
.tb-quiz,
.tb-birds {
    background: linear-gradient(180deg, #fffdf8 0%, #fff 42%);
    border: 1px solid rgba(212, 175, 55, 0.45);
    border-radius: 1.15rem;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
    padding: 0.85rem 0.9rem 1.6rem;
    overflow: visible;
}

.tb-output::before,
.tb-quiz::before,
.tb-birds::before {
    content: "";
    display: block;
    height: 4px;
    margin: -0.85rem -0.9rem 0.7rem;
    border-radius: 1.15rem 1.15rem 0 0;
    background: linear-gradient(90deg, #e4c56a, #b8962e);
}

.tb-output-kicker {
    margin: 0 1.6rem 0.15rem 0;
    color: #8a7020;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.tb-output-place {
    margin: 0 0 0.35rem;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 700;
}

.tb-output-title {
    margin: 0;
    font-size: 1.15rem;
    line-height: 1.2;
    letter-spacing: -0.03em;
    color: #0f172a;
}

.tb-output-brief {
    margin: 0.4rem 0 0;
}

.tb-output-excerpt {
    margin: 0;
    color: #475569;
    font-size: 0.86rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tb-output-excerpt[hidden] {
    display: none !important;
}

.tb-output-acts {
    display: flex;
    gap: 0.35rem;
    margin-top: 0.4rem;
}

.tb-output-act {
    flex: 1 1 0;
    min-height: 44px;
    min-width: 0;
    padding: 0.3rem 0.45rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(212, 175, 55, 0.55);
    background: #fff;
    color: #8a7020;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 750;
    line-height: 1.2;
    cursor: pointer;
}

.tb-output-act:hover {
    border-color: #d4af37;
    color: #b8962e;
    background: #fffaf0;
}

.tb-output-full {
    margin: 0.15rem 0 0;
    color: #334155;
    font-size: 0.92rem;
    line-height: 1.5;
}

.tb-output-full[hidden] {
    display: none !important;
}

.tb-output-full p,
.tb-output-full li {
    margin: 0.35rem 0;
    color: #334155;
    font-size: 0.92rem;
    line-height: 1.5;
}

.tb-output-full h1,
.tb-output-full h2,
.tb-output-full h3 {
    margin: 0.7rem 0 0.3rem;
    color: #0f172a;
    letter-spacing: -0.03em;
    line-height: 1.25;
}

.tb-output-full h1 { font-size: 1.2rem; }
.tb-output-full h2 { font-size: 1.08rem; }
.tb-output-full h3 { font-size: 1rem; }

.tb-output-full ul,
.tb-output-full ol {
    margin: 0.3rem 0 0.3rem 1.15rem;
    padding: 0;
}

.tb-output-full blockquote {
    margin: 0.5rem 0;
    padding-left: 0.7rem;
    border-left: 3px solid #d4af37;
    color: #475569;
}

.tb-output-full a {
    color: #2563eb;
    font-weight: 650;
    text-decoration: underline;
}

.tb-output-full img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0.6rem 0;
    border-radius: 0.7rem;
}

.tb-output-full table {
    width: 100%;
    margin: 0.6rem 0;
    border-collapse: collapse;
}

.tb-output-full td,
.tb-output-full th {
    border: 1px solid #e2e8f0;
    padding: 0.3rem 0.45rem;
    text-align: left;
    vertical-align: top;
}

.tb-output-full .ql-align-center { text-align: center; }
.tb-output-full .ql-align-right { text-align: right; }
.tb-output-full .ql-align-justify { text-align: justify; }
.tb-output-full .ql-indent-1 { padding-left: 1.15rem; }
.tb-output-full .ql-indent-2 { padding-left: 2.3rem; }
.tb-output-full .ql-indent-3 { padding-left: 3.45rem; }

.tb-output-due {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.55rem;
    padding: 0.28rem 0.6rem;
    border-radius: 999px;
    background: #fff7e6;
    color: #8a6d1d;
    font-size: 0.78rem;
    font-weight: 750;
}

.tb-output-qr {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.7rem;
    padding: 0.45rem;
    border-radius: 0.9rem;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.06);
}

.tb-output-qr canvas,
.tb-output-qr img {
    display: block;
    width: 108px;
    height: 108px;
    flex: 0 0 auto;
}

.tb-output-qr p {
    margin: 0;
    color: #334155;
    font-size: 0.82rem;
    font-weight: 650;
    line-height: 1.35;
}

.tb-output-qr small {
    display: block;
    margin-top: 0.25rem;
    color: #94a3b8;
    font-weight: 600;
}

.tb-quiz-live {
    width: 100%;
    margin-top: 0.65rem;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.4rem 0.75rem;
    border: 0;
    border-radius: 0.85rem;
    background: linear-gradient(180deg, #8b5cf6, #6d28d9);
    color: #fff;
    font: inherit;
    font-size: 0.84rem;
    font-weight: 750;
    line-height: 1.2;
    cursor: pointer;
    box-shadow: 0 8px 16px rgba(109, 40, 217, 0.28);
}

.tb-quiz-live:hover {
    filter: brightness(1.05);
}

.tb-quiz-live:disabled {
    opacity: 0.55;
    cursor: default;
    box-shadow: none;
}

.tb-output-meter {
    margin-top: 0.75rem;
}

.tb-output-meter b {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
    font-size: 0.78rem;
    color: #0f172a;
}

.tb-output-meter b span {
    color: #8a7020;
}

.tb-output-track {
    height: 0.7rem;
    border-radius: 999px;
    background: #f1f5f9;
    overflow: hidden;
}

.tb-output-fill {
    display: block;
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, #e4c56a, #b8962e);
    transition: width 0.45s ease;
}

#tb-dlg-time .tb-dialog {
    box-sizing: border-box;
    width: min(100% - 1.5rem, 22.5rem);
    max-width: 22.5rem;
    max-height: calc(100dvh - 1.5rem);
    overflow-y: auto;
}

#tb-dlg-time [hidden] {
    display: none !important;
}

#tb-dlg-draw .tb-dialog {
    box-sizing: border-box;
    width: min(100% - 1.5rem, 22.5rem);
    max-width: 22.5rem;
    max-height: calc(100dvh - 1.5rem);
    overflow-y: auto;
}

#tb-dlg-draw [hidden] {
    display: none !important;
}

#tb-dlg-game .tb-dialog,
#tb-dlg-aq .tb-dialog,
#tb-dlg-rz .tb-dialog {
    box-sizing: border-box;
    width: min(100% - 1.5rem, 22.5rem);
    max-width: 22.5rem;
    max-height: calc(100dvh - 1.5rem);
    overflow-y: auto;
}

#tb-dlg-game [hidden],
#tb-dlg-aq [hidden],
#tb-dlg-rz [hidden] {
    display: none !important;
}

#tb-dlg-aq .tb-game-scroll,
#tb-dlg-rz .tb-game-scroll {
    max-height: min(52dvh, 26rem);
    overflow-y: auto;
    overscroll-behavior: contain;
    margin-bottom: 0.75rem;
}

#tb-dlg-aq .tb-video-opt,
#tb-dlg-rz .tb-video-opt {
    margin-bottom: 0.45rem;
    align-items: flex-start;
}

#tb-dlg-game #tb-game-list,
#tb-dlg-game .tb-game-scroll {
    max-height: min(42dvh, 22rem);
    overflow-y: auto;
    overscroll-behavior: contain;
    margin-bottom: 0.75rem;
}

#tb-dlg-game .tb-game-label,
#tb-dlg-aq .tb-game-label,
#tb-dlg-rz .tb-game-label {
    margin: 0.15rem 0 0.4rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b;
}

#tb-dlg-game .tb-game-team {
    border: 1px solid #e2e8f0;
    border-radius: 0.9rem;
    padding: 0.55rem;
    margin-bottom: 0.55rem;
    background: #fff;
}

#tb-dlg-game .tb-game-team-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.4rem;
}

#tb-dlg-game .tb-game-team-no {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 0.45rem;
    background: #0f172a;
    color: #d4af37;
    font-size: 0.75rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

#tb-dlg-game .tb-game-team input,
#tb-dlg-game .tb-game-team textarea,
#tb-dlg-game select {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 0.8rem;
    background: #fff;
    color: #0f172a;
    font: inherit;
    padding: 0.45rem 0.7rem;
}

#tb-dlg-game .tb-game-team input {
    min-height: 44px;
}

#tb-dlg-game .tb-game-team textarea {
    min-height: 3.2rem;
    resize: vertical;
}

#tb-dlg-game .tb-game-team input:focus,
#tb-dlg-game .tb-game-team textarea:focus,
#tb-dlg-game select:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}

#tb-dlg-game .tb-game-team-actions {
    display: flex;
    gap: 0.35rem;
    margin-top: 0.4rem;
}

#tb-dlg-game .tb-game-team-actions .tb-btn {
    flex: 1 1 0;
    min-height: 44px;
    border-color: #e2e8f0;
    background: #fff;
}

#tb-dlg-game #tb-game-add,
#tb-dlg-game #tb-game-assign {
    width: 100%;
    margin-bottom: 0.75rem;
    border-color: #e2e8f0;
    background: #fff;
}

#tb-dlg-game .tb-video-opt {
    margin-bottom: 0.55rem;
}

#tb-dlg-draw textarea,
#tb-dlg-draw select {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    border: 1px solid #e2e8f0;
    border-radius: 0.85rem;
    background: #fff;
    color: #0f172a;
    font: inherit;
    padding: 0.55rem 0.7rem;
}

#tb-dlg-draw textarea {
    min-height: 7.5rem;
    resize: vertical;
}

#tb-dlg-draw select {
    min-height: 44px;
}

#tb-dlg-draw textarea:focus,
#tb-dlg-draw select:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.22);
}

#tb-dlg-draw #tb-draw-import-apply {
    display: flex;
    width: 100%;
    margin: 0 0 0.35rem;
    border: 1px solid rgba(212, 175, 55, 0.55);
    background: #fffbeb;
    color: #8a6d1d;
    font-weight: 700;
}

#tb-dlg-draw #tb-draw-import-apply:hover {
    background: #f8e7b0;
    color: #7a5e12;
}

#tb-draw-import-note.is-error {
    color: #be123c;
    font-weight: 650;
}

.tb-draw-once {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 44px;
    margin: 0.35rem 0 0.7rem;
    font-weight: 650;
    color: #0f172a;
}

.tb-draw-once input {
    width: 1.15rem;
    height: 1.15rem;
    accent-color: #d4af37;
}

.tb-draw {
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 1.15rem;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
    padding: 0.85rem 0.85rem 0.75rem;
}

.tb-draw-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
}

.tb-draw-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.tb-draw-pointer {
    position: absolute;
    top: 0.15rem;
    left: 50%;
    z-index: 2;
    width: 0;
    height: 0;
    border-left: 11px solid transparent;
    border-right: 11px solid transparent;
    border-top: 22px solid #0f172a;
    transform: translateX(-50%);
    filter: drop-shadow(0 3px 4px rgba(15, 23, 42, 0.25));
    pointer-events: none;
}

.tb-draw-pointer::after {
    content: "";
    position: absolute;
    top: -22px;
    left: -6px;
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: linear-gradient(180deg, #f3d36b, #b8962e);
    box-shadow: 0 0 0 2px #0f172a;
}

.tb-draw-winner {
    margin: 0.55rem 0 0;
    padding: 0.45rem 0.7rem;
    border-radius: 0.85rem;
    background: linear-gradient(180deg, #fff7e0, #fff);
    border: 1px solid rgba(212, 175, 55, 0.55);
    text-align: center;
    font-weight: 750;
    color: #0f172a;
}

.tb-draw-actions {
    display: flex;
    gap: 0.4rem;
    margin-top: 0.7rem;
}

.tb-draw-act {
    flex: 1 1 auto;
    min-height: 44px;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    border-radius: 0.85rem;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #334155;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.tb-draw-act.is-primary {
    border-color: transparent;
    background: linear-gradient(180deg, #e0c15a, #b8962e);
    color: #fff;
}

.tb-draw-act:disabled {
    opacity: 0.55;
}

.tb-draw-groups {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(8.6rem, 1fr));
    gap: 0.45rem;
}

.tb-draw-note {
    grid-column: 1 / -1;
    margin: 0;
    padding: 0.4rem 0.55rem;
    border-radius: 0.75rem;
    background: #fffbeb;
    color: #8a6d1d;
    font-size: 0.78rem;
}

.tb-draw-card {
    border-radius: 0.95rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 0.45rem 0.5rem 0.55rem;
}

.tb-draw-card header {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.35rem;
}

.tb-draw-card b {
    width: 1.7rem;
    height: 1.7rem;
    border-radius: 0.55rem;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
}

.tb-draw-card span {
    font-weight: 750;
    color: #0f172a;
    font-size: 0.82rem;
}

.tb-draw-card ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.tb-draw-card li {
    background: #fff;
    border-radius: 0.65rem;
    padding: 0.28rem 0.45rem;
    font-size: 0.8rem;
    color: #334155;
}

#tb-dlg-time .tb-choice {
    align-items: center;
}

#tb-dlg-time .tb-choice span {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
    text-align: left;
    font-size: 0.95rem;
    color: #0f172a;
}

#tb-dlg-time .tb-choice small {
    font-weight: 500;
    color: #64748b;
    font-size: 0.75rem;
}

.tb-time-modes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.75rem;
}

.tb-time-mode {
    flex: 1 1 0;
    min-height: 44px;
    min-width: 0;
    padding: 0 0.35rem;
    border-radius: 0.8rem;
    border: 1px solid #e2e8f0;
    background: #fff;
    font: inherit;
    font-size: 0.92rem;
    font-weight: 700;
    color: #334155;
    cursor: pointer;
}

.tb-time-mode.is-on {
    border-color: #d4af37;
    background: #fffbeb;
    color: #b8962e;
}

.tb-time-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.75rem;
}

.tb-time-chip {
    min-height: 44px;
    padding: 0 0.75rem;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    background: #fff;
    font: inherit;
    font-weight: 700;
    color: #334155;
    cursor: pointer;
}

.tb-time-chip.is-on {
    border-color: #d4af37;
    background: #fffbeb;
    color: #b8962e;
}

.tb-time {
    padding: 0.85rem 0.9rem 0.75rem;
    box-sizing: border-box;
}

.tb-time-analog,
.tb-time-ringwrap {
    width: min(100%, 13.5rem);
    margin: 0 auto;
}

.tb-time-ringwrap {
    position: relative;
}

.tb-time svg {
    width: 100%;
    height: auto;
    display: block;
}

.tb-time-disk { fill: #fff; stroke: #e2e8f0; stroke-width: 3; }
.tb-time-tick { stroke: #cbd5e1; stroke-width: 2; }
.tb-time-tick.is-major { stroke: #94a3b8; stroke-width: 2.5; }
.tb-time-num { fill: #475569; font-size: 13px; font-family: Outfit, system-ui, sans-serif; font-weight: 600; }
.tb-time-hhand { stroke: #0f172a; stroke-width: 5; stroke-linecap: round; }
.tb-time-mhand { stroke: #0f172a; stroke-width: 3.5; stroke-linecap: round; }
.tb-time-shand { stroke: #d4af37; stroke-width: 2; stroke-linecap: round; }
.tb-time-cap { fill: #d4af37; stroke: #fff; stroke-width: 2; }
.tb-time-bg, .tb-time-fg { fill: none; }
.tb-time-bg { stroke: #f1f5f9; stroke-width: 8; }
.tb-time-fg { stroke: #d4af37; stroke-width: 8; stroke-linecap: round; }

.tb-time.is-urgent .tb-time-fg,
.tb-time.is-done .tb-time-fg { stroke: #e11d48; }

.tb-time-center {
    position: absolute;
    inset: 18%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-width: 0;
}

.tb-time-digits {
    margin: 0.35rem 0 0;
    text-align: center;
    font-family: Outfit, system-ui, sans-serif;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.04em;
    line-height: 1;
    font-size: clamp(1.7rem, 5vw, 2.4rem);
    color: #0f172a;
}

.tb-time-ringwrap .tb-time-digits {
    margin: 0;
    font-size: clamp(1.45rem, 4vw, 2rem);
}

.tb-time-ringwrap .tb-time-digits.is-long {
    font-size: clamp(1.05rem, 3.2vw, 1.35rem);
    letter-spacing: -0.03em;
}

.tb-time.is-done .tb-time-digits,
.tb-time.is-urgent .tb-time-digits { color: #be123c; }

.tb-time-sub {
    margin: 0.2rem 0 0;
    text-align: center;
    color: #64748b;
    font-size: 0.82rem;
}

.tb-time-sub::first-letter { text-transform: uppercase; }

.tb-time-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.75rem;
}

.tb-time-act {
    flex: 1 1 calc(50% - 0.35rem);
    min-height: 44px;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.35rem 0.55rem;
    border-radius: 0.8rem;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #334155;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
}

.tb-time-act.is-primary {
    border-color: transparent;
    background: linear-gradient(180deg, #e4c56a, #b8962e);
    color: #fff;
    box-shadow: 0 8px 16px rgba(184, 150, 46, 0.28);
}

.tb-time-laps {
    margin: 0.55rem 0 0;
    padding: 0;
    list-style: none;
    color: #475569;
    font-size: 0.78rem;
    font-variant-numeric: tabular-nums;
}

.tb-time-laps li {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.15rem 0;
}

.tb-time-laps:empty {
    display: none;
}

.tb-item.is-selected {
    border-color: rgba(212, 175, 55, 0.85);
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.45), 0 14px 34px rgba(15, 23, 42, 0.08);
}

.tb-text-plain {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
}

.tb-text-plain.is-selected {
    border-color: transparent;
    box-shadow: none;
    outline: 2px dashed rgba(212, 175, 55, 0.9);
    outline-offset: 6px;
}

.tb-text-plain .tb-text-body {
    padding: 0.2rem 2rem 0.25rem 0.15rem;
}

.tb-font-roboto .tb-text-body { font-family: Roboto, system-ui, sans-serif; }
.tb-font-literata .tb-text-body { font-family: Literata, Georgia, "Times New Roman", serif; }
.tb-font-gloria .tb-text-body {
    font-family: "Gloria Hallelujah", cursive;
    font-size: 1.45rem;
    line-height: 1.5;
}
.tb-font-gloria .tb-text-body h2 { font-size: 1.85rem; letter-spacing: 0; }
.tb-font-gloria .tb-text-body h3 { font-size: 1.55rem; letter-spacing: 0; }

.tb-fonts {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    flex: 0 0 auto;
}

.tb-font {
    min-height: 44px;
    padding: 0 0.75rem;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #0f172a;
    font-size: 0.95rem;
    cursor: pointer;
}

.tb-font[data-font="gloria"] { font-size: 1.05rem; }

.tb-font.is-on,
.tb-format .tb-btn.is-on {
    border-color: #d4af37;
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.35);
}

.tb-text-pop {
    position: fixed;
    z-index: 35;
    box-sizing: border-box;
    width: min(18rem, calc(100vw - 1rem));
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.45rem;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.85);
    border-radius: 1.15rem;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.16);
}

.tb-text-pop[hidden] { display: none !important; }

.tb-text-choice {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
    min-height: 52px;
    padding: 0.55rem 0.75rem;
    border: 1px solid transparent;
    border-radius: 0.85rem;
    background: transparent;
    text-align: left;
    cursor: pointer;
    font: inherit;
    color: #0f172a;
}

.tb-text-choice b { font-size: 0.92rem; }
.tb-text-choice small { color: #64748b; font-size: 0.75rem; line-height: 1.3; }

.tb-text-choice:hover,
.tb-text-choice:focus-visible,
.tb-text-choice.is-on {
    background: rgba(212, 175, 55, 0.12);
    border-color: rgba(212, 175, 55, 0.55);
}

.tb-del,
.tb-resize {
    position: absolute;
    z-index: 3;
    border: 0;
    background: transparent;
    color: #64748b;
    cursor: pointer;
}

.tb-del {
    right: 4px;
    top: 4px;
    z-index: 4;
    width: 44px;
    height: 44px;
    border-radius: 0.7rem;
    background: #fff;
    cursor: pointer;
    opacity: 0;
}

.tb-item:hover .tb-del,
.tb-item.is-selected .tb-del,
.tb-item:focus-within .tb-del {
    opacity: 1;
}

.tb-chrome {
    position: absolute;
    top: 4px;
    right: 4px;
    z-index: 6;
    display: flex;
    gap: 2px;
    padding: 2px;
    border-radius: 0.9rem;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
    opacity: 0;
    pointer-events: none;
}

.tb-item:hover > .tb-chrome,
.tb-item.is-selected > .tb-chrome,
.tb-item:focus-within > .tb-chrome,
.tb-item.is-max > .tb-chrome,
.tb-item.is-min > .tb-chrome {
    opacity: 1;
    pointer-events: auto;
}

.tb-item:hover:not(.is-max),
.tb-item.is-selected:not(.is-max),
.tb-item:focus-within:not(.is-max) {
    z-index: 1000 !important;
}

.tb-item > .tb-chrome {
    top: auto;
    right: 0;
    bottom: calc(100% + 10px);
}

.tb-item > .tb-chrome::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: 14px;
}

.tb-chrome .tb-del,
.tb-chrome .tb-min,
.tb-chrome .tb-max {
    position: static;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 0.7rem;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    opacity: 1;
}

.tb-chrome .tb-min,
.tb-chrome .tb-max,
.tb-chrome .tb-del {
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}

.tb-chrome .tb-min i,
.tb-chrome .tb-max i,
.tb-chrome .tb-del i {
    display: inline-block;
    transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.tb-chrome .tb-min:hover,
.tb-chrome .tb-max:hover,
.tb-chrome .tb-del:hover,
.tb-chrome .tb-min.is-on,
.tb-chrome .tb-max.is-on {
    background: rgba(212, 175, 55, 0.16);
    color: #8a7020;
}

.tb-chrome .tb-min:active,
.tb-chrome .tb-max:active,
.tb-chrome .tb-del:active {
    transform: scale(0.9);
}

.tb-chrome .tb-del:active i {
    transform: rotate(90deg);
}

.tb-chrome .is-swap i {
    animation: tb-icon-pop 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes tb-icon-pop {
    0% { transform: scale(0.45) rotate(-16deg); opacity: 0; }
    100% { transform: none; opacity: 1; }
}

.tb-item.is-view-motion,
.tb-item.is-folding {
    overflow: visible;
}

.tb-item.is-min:not(.is-folding) > :not(.tb-chrome):not(.tb-minibar) {
    display: none !important;
}

.tb-item.is-folding > :not(.tb-chrome):not(.tb-minibar):not(.tb-resize) {
    animation: tb-fold-out 0.24s ease forwards;
    pointer-events: none;
}

.tb-item.is-folding > .tb-resize {
    opacity: 0;
}

.tb-item.is-folding .tb-minibar {
    position: absolute;
    z-index: 4;
    left: 0;
    right: 0;
    top: 3px;
    background: rgba(255, 255, 255, 0.97);
    animation: tb-fold-in 0.26s ease forwards;
}

.tb-item.is-closing {
    pointer-events: none;
}

@keyframes tb-fold-out {
    to { opacity: 0; transform: translateY(-8px); }
}

@keyframes tb-fold-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .tb-chrome .is-swap i,
    .tb-item.is-folding > :not(.tb-chrome):not(.tb-minibar):not(.tb-resize),
    .tb-item.is-folding .tb-minibar {
        animation: none !important;
    }
}

.tb-minibar {
    display: none;
}

.tb-item.is-min {
    min-height: 0;
    padding: 0 !important;
    overflow: visible;
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(212, 175, 55, 0.55);
    border-radius: 0.9rem;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    outline: none;
}

.tb-item.is-min:not(.is-folding):not(.is-view-motion) {
    height: auto !important;
}

.tb-item.is-min::before {
    content: "";
    display: block;
    height: 3px;
    margin: 0 !important;
    background: linear-gradient(90deg, #e4c56a, #b8962e);
}


.tb-item.is-min .tb-minibar {
    display: flex;
    align-items: center;
    min-height: 52px;
    padding: 0.35rem 0.9rem 0.4rem;
    cursor: grab;
}

.tb-minibar-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #0f172a;
}

.tb-item.is-max {
    z-index: 100000;
    box-sizing: border-box;
    overflow: visible;
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.18);
    outline: none;
}

.tb-item.is-max > .tb-resize,
.tb-item.is-min > .tb-resize {
    display: none !important;
}

.tb-resize {
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    border-radius: 0.7rem;
    opacity: 0;
    pointer-events: none;
}

.tb-resize::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 12px;
    height: 12px;
    transform: translate(-50%, -50%);
    border: 2px solid #d4af37;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.16);
}

.tb-item:hover > .tb-resize,
.tb-item.is-selected > .tb-resize,
.tb-item:focus-within > .tb-resize,
.tb-resize-se {
    opacity: 1;
    pointer-events: auto;
}

.tb-resize-n { left: 50%; top: -18px; transform: translateX(-50%); cursor: ns-resize; }
.tb-resize-s { left: 50%; bottom: -18px; transform: translateX(-50%); cursor: ns-resize; }
.tb-resize-e { top: 50%; right: -18px; transform: translateY(-50%); cursor: ew-resize; }
.tb-resize-w { top: 50%; left: -18px; transform: translateY(-50%); cursor: ew-resize; }
.tb-resize-ne { top: -16px; right: -16px; cursor: nesw-resize; }
.tb-resize-nw { top: -16px; left: -16px; cursor: nwse-resize; }
.tb-resize-se { right: -16px; bottom: -16px; cursor: nwse-resize; }
.tb-resize-sw { left: -16px; bottom: -16px; cursor: nesw-resize; }

.tb-resize-se::after {
    left: auto;
    top: auto;
    right: 14px;
    bottom: 14px;
    width: 18px;
    height: 18px;
    transform: none;
    border: 0;
    border-radius: 0 0 0.65rem 0;
    background: linear-gradient(135deg, transparent 62%, #d4af37 62%);
    box-shadow: none;
}

.tb-text > .tb-resize-se,
.tb-text > .tb-resize-se::after {
    display: none !important;
}

.tb-item.is-sized {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.tb-output.is-sized::before,
.tb-quiz.is-sized::before,
.tb-birds.is-sized::before,
.tb-aq.is-sized::before,
.tb-rz.is-sized::before {
    flex: 0 0 auto;
}

.tb-item.is-sized > .tb-text-body,
.tb-item.is-sized > .tb-link-open,
.tb-item.is-sized > .tb-birds-body,
.tb-item.is-sized > .tb-time-body,
.tb-item.is-sized > .tb-draw-body,
.tb-item.is-sized > .tb-aq-body,
.tb-item.is-sized > .tb-rz-body,
.tb-output.is-sized > div:not(.tb-chrome):not(.tb-minibar),
.tb-quiz.is-sized > div:not(.tb-chrome):not(.tb-minibar) {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
}

.tb-birds.is-sized .tb-birds-body {
    display: flex;
    flex-direction: column;
}

.tb-birds.is-sized .tb-birds-body img {
    flex: 1 1 auto;
    width: 100%;
    max-height: none;
    min-height: 4.5rem;
    object-fit: contain;
}

.tb-video.is-sized > .tb-link-open {
    min-height: 0;
}

.tb-video.is-sized .tb-video-shot {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    object-fit: cover;
}

.tb-draw.is-sized .tb-draw-body {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.tb-draw.is-sized .tb-draw-stage {
    flex: 1 1 auto;
    aspect-ratio: auto;
    min-height: 8rem;
}

.tb-time.is-sized .tb-time-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

.tb-time.is-sized .tb-time-analog,
.tb-time.is-sized .tb-time-ringwrap {
    width: min(100%, 42rem);
}

.tb-text-body {
    min-height: 2.6rem;
    padding: 0.75rem 2.2rem 0.8rem 0.9rem;
    outline: none;
    user-select: none;
    -webkit-user-select: none;
    cursor: grab;
    line-height: 1.45;
    font-size: 1.05rem;
    overflow-wrap: anywhere;
}

.tabule-shell.is-editing .tb-text-body[contenteditable="true"] {
    user-select: text;
    -webkit-user-select: text;
    cursor: text;
    touch-action: manipulation;
}

.tb-text-body h1,
.tb-text-body h2,
.tb-text-body h3 {
    margin: 0.15em 0 0.3em;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.tb-text-body h2 { font-size: 1.35rem; }
.tb-text-body h3 { font-size: 1.12rem; }
.tb-text-body p { margin: 0.2em 0; }
.tb-text-body ul,
.tb-text-body ol { margin: 0.25em 0 0.25em 1.1em; padding: 0; }
.tb-text-body a {
    color: #b45309;
    text-decoration: underline;
    text-underline-offset: 0.14em;
    cursor: pointer;
}

.tabule-shell.is-editing .tb-text-body:focus a {
    cursor: text;
}

.tb-link-open {
    width: 100%;
    min-height: 72px;
    border: 0;
    background: transparent;
    text-align: left;
    padding: 0.8rem 2.2rem 0.8rem 1.5rem;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.tb-link-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: #b8962e;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.tb-link-title {
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #0f172a;
}

.tb-link-host {
    color: #64748b;
    font-size: 0.8rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tb-link-game,
.tb-link-aq,
.tb-link-rz {
    border-color: rgba(212, 175, 55, 0.55);
    box-shadow: 0 12px 28px rgba(184, 150, 46, 0.14);
}

.tb-game-edit,
.tb-aq-edit,
.tb-rz-edit {
    display: flex;
    align-items: center;
    justify-content: center;
    width: calc(100% - 1rem);
    margin: 0 0.5rem 0.55rem;
    min-height: 44px;
    border-radius: 0.8rem;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #0f172a;
    font: inherit;
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
}

.tb-game-edit:hover,
.tb-game-edit:focus-visible,
.tb-aq-edit:hover,
.tb-aq-edit:focus-visible,
.tb-rz-edit:hover,
.tb-rz-edit:focus-visible {
    border-color: #d4af37;
    background: #fffbeb;
}

.tb-video {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 1rem;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.tb-video-preview .tb-link-open,
.tb-video-play .tb-link-open {
    position: relative;
    min-height: 0;
    padding: 0;
    overflow: hidden;
    border-radius: 1rem;
}

.tb-video-preview .tb-link-open {
    display: block;
    min-height: 6rem;
}

.tb-video-shot {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: #0f172a;
    -webkit-user-drag: none;
    user-select: none;
}

.tb-video-float {
    position: fixed;
    inset: 0;
    z-index: 11;
    pointer-events: none;
}

.tb-video-float[hidden] { display: none !important; }

.tb-video-live {
    position: fixed;
    pointer-events: auto;
    border-radius: 1rem;
    overflow: hidden;
    background: #0f172a;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.22);
}

.tb-video-frame {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    background: #0f172a;
}

.tb-video-stop,
.tb-video-fs {
    position: absolute;
    top: 8px;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 0.7rem;
    background: rgba(15, 23, 42, 0.72);
    color: #fff;
    cursor: pointer;
}

.tb-video-fs { right: 56px; }
.tb-video-stop { right: 8px; }

#tb-open-inline[hidden],
#tb-open-game[hidden],
#tb-open-quiz[hidden],
#tb-open-birds[hidden],
#tb-open-aq[hidden],
#tb-open-rz[hidden] { display: none !important; }

.tb-video-play .tb-link-open {
    min-height: 7.5rem;
}

.tb-play-badge {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 4rem;
    height: 4rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(145deg, #b8962e, #d4af37);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.28);
    pointer-events: none;
}

.tb-play-badge i {
    margin-left: 0.15rem;
    font-size: 1.25rem;
}

.tb-video-pick {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.tb-video-pick[hidden] {
    display: none !important;
}

.tb-video-pick > span {
    font-size: 0.78rem;
    font-weight: 700;
    color: #64748b;
}

.tb-video-opt {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 44px;
    padding: 0.4rem 0.55rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.85rem;
    background: #fff;
    cursor: pointer;
}

.tb-video-opt:has(:checked) {
    border-color: #d4af37;
    background: #fffbeb;
    box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.35);
}

.tb-video-opt input {
    width: 1.05rem;
    height: 1.05rem;
    accent-color: #d4af37;
    flex: 0 0 auto;
}

.tb-video-opt b {
    display: block;
    font-size: 0.86rem;
}

.tb-video-opt small {
    display: block;
    color: #64748b;
    font-size: 0.72rem;
    line-height: 1.3;
}

.tb-dock {
    position: absolute;
    z-index: 12;
    left: 0.65rem;
    right: 0.65rem;
    bottom: calc(0.5rem + env(safe-area-inset-bottom));
    display: flex;
    align-items: stretch;
    gap: 0.35rem;
    min-width: 0;
    padding: 0.45rem 0.5rem;
    border-radius: 1.75rem;
    background: rgba(255, 255, 255, 0.42);
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.1);
    backdrop-filter: blur(20px) saturate(1.45);
    -webkit-backdrop-filter: blur(20px) saturate(1.45);
}

.tb-dock-scroll {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: stretch;
    gap: 0.2rem;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
}

.tb-app,
.tb-dock-add {
    flex: 0 0 auto;
    width: 6.5rem;
    min-height: 92px;
    border: 1px solid transparent;
    border-radius: 1.15rem;
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0.35rem;
    padding: 0.35rem 0.3rem 0.4rem;
    cursor: pointer;
    color: #0f172a;
    font: inherit;
}

.tb-app:hover,
.tb-dock-add:hover,
.tb-app:focus-visible,
.tb-dock-add:focus-visible {
    background: rgba(255, 255, 255, 0.62);
    border-color: rgba(212, 175, 55, 0.45);
}

.tb-app-icon,
.tb-dock-add i {
    width: 54px;
    height: 54px;
    border-radius: 1.05rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex: 0 0 auto;
}

.tb-app-icon {
    background: #fff;
    color: var(--tb-icon, #b8962e);
    box-shadow:
        inset 0 0 0 1px color-mix(in srgb, var(--tb-icon, #b8962e) 32%, #e8edf3),
        0 8px 16px rgba(15, 23, 42, 0.06);
}

.tb-app-icon svg {
    width: 30px;
    height: 30px;
    display: block;
}

.tb-app-icon i {
    font-size: 1.55rem;
    line-height: 1;
    color: var(--tb-icon, #b8962e);
}

.tb-dock-add i {
    background: rgba(255, 255, 255, 0.78);
    color: #8a6d1d;
    font-size: 1.15rem;
    box-shadow: inset 0 0 0 1px rgba(212, 175, 55, 0.45);
}

.tb-app > span:not(.tb-app-icon),
.tb-dock-add span {
    max-width: 100%;
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.01em;
    color: #0f172a;
    text-align: center;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tb-dock-add {
    width: 6.5rem;
    min-width: 6.5rem;
    max-width: 6.5rem;
    padding-inline: 0.3rem;
    color: #8a6d1d;
}

.tb-dock-add span {
    width: 100%;
    white-space: normal;
}

.tb-backdrop,
.tb-drawer {
    position: absolute;
    z-index: 20;
}

.tb-backdrop {
    inset: 0;
    background: rgba(15, 23, 42, 0.38);
    backdrop-filter: blur(2px);
}

.tb-backdrop[hidden],
.tb-drawer[hidden] {
    display: none !important;
}

.tb-drawer {
    top: 0;
    bottom: 0;
    left: 0;
    width: min(100% - 0.75rem, 22rem);
    background: #fff;
    box-shadow: 16px 0 40px rgba(15, 23, 42, 0.12);
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.tb-drawer-head,
.tb-browser-head {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 0.6rem;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    min-height: 56px;
}

.tb-browser-head {
    flex-wrap: wrap;
    cursor: grab;
    user-select: none;
    touch-action: none;
}

.tb-browser-head input {
    cursor: text;
    user-select: text;
    touch-action: manipulation;
}

.tb-browser-head button,
.tb-browser-head a {
    touch-action: manipulation;
}

.tb-browser-grip {
    flex: 0 0 auto;
    width: 28px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    cursor: grab;
}

.tb-browser.is-moving .tb-browser-head,
.tb-browser.is-moving .tb-browser-grip {
    cursor: grabbing;
}

.tb-drawer-head h2,
.tb-browser-head strong {
    margin: 0;
    font-size: 1rem;
    letter-spacing: -0.02em;
    flex: 1 1 auto;
    min-width: 0;
}

.tb-drawer-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0.55rem 0.65rem 1rem;
}

.tb-folder,
.tb-preset {
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 0.9rem;
    background: #fff;
    margin: 0 0 0.45rem;
}

.tb-folder {
    background: #fafaf9;
}

.tb-folder-head,
.tb-preset-open {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    min-height: 44px;
    width: 100%;
}

.tb-folder-name,
.tb-preset-open {
    border: 0;
    background: transparent;
    text-align: left;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    min-width: 0;
    flex: 1 1 auto;
    padding: 0.35rem 0.45rem;
}

.tb-mini {
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 0.65rem;
    background: transparent;
    color: #64748b;
    cursor: pointer;
}

.tb-mini:hover {
    background: #fff7e6;
    color: #8a6d1d;
}

.tb-folder-body {
    padding: 0 0.45rem 0.45rem 0.85rem;
}

.tb-preset small {
    display: block;
    color: #94a3b8;
    font-size: 0.72rem;
    padding: 0 0.45rem 0.4rem;
}

.tb-empty {
    color: #94a3b8;
    font-size: 0.85rem;
    padding: 0.4rem 0.2rem 0.7rem;
}

.tb-browser {
    position: absolute;
    top: 0.55rem;
    right: 0.55rem;
    bottom: 0.55rem;
    width: min(100% - 1.1rem, 52rem);
    z-index: 15;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 1.2rem;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
    border: 1px solid rgba(15, 23, 42, 0.06);
}

.tb-browser[hidden] {
    display: none !important;
}

.tb-browser.is-integrated {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: auto;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: #070b14;
}

.tb-browser.is-web {
    left: 0.55rem;
    width: auto;
}

.tb-browser.is-placed {
    right: auto;
    bottom: auto;
    max-width: none;
    max-height: none;
}

.tb-browser.is-moving .tb-browser-frame {
    pointer-events: none;
}

body.tb-browser-gesture {
    user-select: none;
}

.tb-browser-resize {
    position: absolute;
    z-index: 5;
    touch-action: none;
}

.tb-browser-resize[data-edge="n"],
.tb-browser-resize[data-edge="s"] {
    left: 14px;
    right: 14px;
    height: 8px;
}

.tb-browser-resize[data-edge="n"] { top: 0; cursor: ns-resize; }
.tb-browser-resize[data-edge="s"] { bottom: 0; cursor: ns-resize; }

.tb-browser-resize[data-edge="e"],
.tb-browser-resize[data-edge="w"] {
    top: 3.6rem;
    bottom: 14px;
    width: 8px;
}

.tb-browser-resize[data-edge="e"] { right: 0; cursor: ew-resize; }
.tb-browser-resize[data-edge="w"] { left: 0; cursor: ew-resize; }

.tb-browser-resize[data-edge="nw"],
.tb-browser-resize[data-edge="ne"],
.tb-browser-resize[data-edge="sw"],
.tb-browser-resize[data-edge="se"] {
    width: 16px;
    height: 16px;
}

.tb-browser-resize[data-edge="nw"] { top: 0; left: 0; cursor: nwse-resize; }
.tb-browser-resize[data-edge="ne"] { top: 0; right: 0; cursor: nesw-resize; }
.tb-browser-resize[data-edge="sw"] { bottom: 0; left: 0; cursor: nesw-resize; }
.tb-browser-resize[data-edge="se"] { bottom: 0; right: 0; cursor: nwse-resize; }

.tb-browser-resize[data-edge="se"]::after {
    content: "";
    position: absolute;
    right: 4px;
    bottom: 4px;
    width: 8px;
    height: 8px;
    border-right: 2px solid rgba(138, 109, 29, 0.55);
    border-bottom: 2px solid rgba(138, 109, 29, 0.55);
    pointer-events: none;
}

.tb-browser:hover .tb-browser-resize[data-edge="se"]::after,
.tb-browser.is-moving .tb-browser-resize[data-edge="se"]::after {
    border-color: #b8962e;
}

.tb-browser.is-integrated .tb-browser-resize,
.tb-browser.is-integrated .tb-browser-grip {
    display: none;
}

@media (pointer: coarse) {
    .tb-browser-resize[data-edge="n"],
    .tb-browser-resize[data-edge="s"] {
        height: 16px;
    }

    .tb-browser-resize[data-edge="e"],
    .tb-browser-resize[data-edge="w"] {
        width: 16px;
    }

    .tb-browser-resize[data-edge="nw"],
    .tb-browser-resize[data-edge="ne"],
    .tb-browser-resize[data-edge="sw"],
    .tb-browser-resize[data-edge="se"] {
        width: 28px;
        height: 28px;
    }
}

.tb-browser.is-integrated .tb-browser-head,
.tb-browser.is-integrated .tb-browser-note {
    display: none;
}

.tb-browser.is-integrated .tb-browser-frame {
    background: #070b14;
}

.tb-browser-head .tb-browser-pop {
    width: auto;
    min-width: 44px;
    padding: 0 0.8rem;
    background: #fff7e6;
    border-color: rgba(212, 175, 55, 0.55);
    color: #8a6d1d;
    font-weight: 700;
}

.tb-browser-go {
    flex: 1 1 16rem;
    min-width: min(100%, 12rem);
    display: flex;
    align-items: center;
    gap: 0.35rem;
    min-height: 44px;
    margin: 0;
    padding: 0 0.15rem 0 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #f8fafc;
    color: #b8962e;
}

.tb-browser-go:focus-within {
    border-color: rgba(212, 175, 55, 0.85);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.18);
    background: #fff;
}

.tb-browser-go input {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    height: 40px;
    border: 0;
    background: transparent;
    color: #0f172a;
    font: inherit;
    font-size: 0.84rem;
}

.tb-browser-go input:focus {
    outline: none;
}

.tb-browser-go .tb-icon-btn {
    width: 40px;
    min-width: 40px;
    height: 40px;
    min-height: 40px;
}

.tb-browser-frame {
    flex: 1 1 auto;
    min-height: 0;
    border: 0;
    width: 100%;
    background: #f8fafc;
}

.tb-browser.is-blocked .tb-browser-frame,
.tb-browser.is-blocked .tb-browser-note,
.tb-browser.is-live .tb-browser-frame,
.tb-browser.is-live .tb-browser-note {
    display: none;
}

.tb-browser-fallback {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.85rem;
    padding: 1.5rem;
    text-align: center;
    background:
        radial-gradient(circle at 50% 0%, rgba(212, 175, 55, 0.16), transparent 28rem),
        #f8fafc;
}

.tb-browser-fallback[hidden] {
    display: none !important;
}

.tb-browser-fallback p {
    margin: 0;
    max-width: 22rem;
    color: #475569;
    font-size: 0.95rem;
    line-height: 1.45;
}

.tb-browser-fallback .tb-btn {
    min-height: 44px;
    padding: 0 1.1rem;
    text-decoration: none;
}

.tb-browser-note {
    margin: 0;
    padding: 0.35rem 0.75rem 0.5rem;
    color: #94a3b8;
    font-size: 0.72rem;
}

.tb-save-head {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    margin-bottom: 0.85rem;
}

.tb-save-head h2,
.tb-save-head p {
    margin: 0;
}

.tb-save-head p {
    margin-top: 0.15rem;
}

.tb-save-mark {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    color: #fff;
    background: linear-gradient(145deg, #f3e2a4, #d4af37);
    box-shadow: 0 8px 16px rgba(184, 150, 46, 0.28);
}

.tb-folder-pick {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    max-height: min(32dvh, 11rem);
    overflow-y: auto;
    overscroll-behavior: contain;
    margin-bottom: 0.45rem;
}

.tb-folder-opt,
.tb-folder-add {
    width: 100%;
    min-height: 44px;
    border-radius: 0.9rem;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    text-align: left;
}

.tb-folder-opt {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.7rem;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #0f172a;
}

.tb-folder-opt i {
    width: 1.1rem;
    text-align: center;
    color: #b8962e;
}

.tb-folder-opt span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tb-folder-opt.is-on,
.tb-folder-opt:hover,
.tb-folder-opt:focus-visible {
    border-color: #d4af37;
    background: #fffbeb;
    box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.28);
}

.tb-folder-add {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    border: 1px dashed rgba(212, 175, 55, 0.75);
    background: transparent;
    color: #8a6d1d;
}

.tb-folder-add:hover,
.tb-folder-add:focus-visible {
    background: #fffbeb;
}

.tb-folder-new {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 0.45rem;
}

.tb-folder-new[hidden],
.tb-folder-add[hidden] {
    display: none !important;
}

.tb-folder-new input {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 44px;
    border: 1px solid #e2e8f0;
    border-radius: 0.85rem;
    padding: 0 0.7rem;
    font: inherit;
}

.tb-folder-new input:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}

.tb-folder-new .tb-btn {
    flex: 0 0 auto;
}

#tb-dlg-save .tb-dialog {
    max-height: calc(100dvh - 1.5rem);
    overflow-y: auto;
}

#tb-dlg-book .tb-dialog {
    max-height: calc(100dvh - 1.5rem);
    overflow-y: auto;
}

.tb-book-crumb {
    min-height: 1rem;
    margin: 0 0 0.45rem;
    color: #64748b;
    font-size: 0.75rem;
}

#tb-book-back[hidden] {
    display: none !important;
}

.tb-app-insert > i {
    margin-left: auto;
    color: #94a3b8;
    font-size: 0.8rem;
}

.tb-overlay {
    background: rgba(15, 23, 42, 0.46);
    backdrop-filter: blur(5px);
    z-index: 40;
}

.tb-dialog {
    background: #fff;
    border-radius: 1.25rem;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
    padding: 1rem 1rem 0.9rem;
}

.tb-dialog h2 {
    margin: 0 0 0.25rem;
    font-size: 1.15rem;
    letter-spacing: -0.03em;
}

.tb-dialog p {
    margin: 0 0 0.75rem;
    color: #64748b;
    font-size: 0.88rem;
}

.tb-field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-bottom: 0.7rem;
}

.tb-field span {
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b;
}

#tb-dlg-save .tb-save-head p {
    margin: 0.15rem 0 0;
}

#tb-save-folders .tb-folder-opt span {
    font-size: 0.92rem;
    color: #0f172a;
}

.tb-field input,
.tb-field select {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    min-height: 44px;
    border-radius: 0.8rem;
    border: 1px solid #e2e8f0;
    padding: 0.45rem 0.7rem;
    font: inherit;
    background: #fff;
}

.tb-field input:focus,
.tb-field select:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}

.tb-stack {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.tb-choice {
    width: 100%;
    min-height: 48px;
    border-radius: 0.9rem;
    border: 1px solid #e2e8f0;
    background: #fff;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.4rem 0.7rem;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    text-align: left;
}

a.tb-choice,
a.tb-icon-btn {
    text-decoration: none;
    color: inherit;
}

.tb-choice:hover {
    border-color: rgba(212, 175, 55, 0.7);
    background: #fffbeb;
}

.tb-choice i {
    width: 1.4rem;
    text-align: center;
    color: #b8962e;
}

.tb-qr {
    width: 220px;
    height: 220px;
    margin: 0.2rem auto 0.6rem;
}

.tb-qr canvas {
    display: block !important;
    width: 220px !important;
    height: 220px !important;
    max-width: none !important;
}

.tb-qr img {
    display: none !important;
}

.tb-url-text {
    font-size: 0.75rem;
    color: #64748b;
    word-break: break-all;
    margin-bottom: 0.7rem;
}

#tb-dlg-apps .tb-dialog,
#tb-dlg-insert .tb-dialog,
#tb-dlg-share .tb-dialog {
    width: min(100% - 1.5rem, 28rem);
    max-width: 28rem;
}

.tb-apps {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: min(52dvh, 26rem);
    overflow-y: auto;
    overscroll-behavior: contain;
    margin-bottom: 0.85rem;
    padding: 0.1rem 0.15rem 0.1rem 0;
}

.tb-app-pick {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    min-height: 4.4rem;
    border: 1px solid #e7edf3;
    border-radius: 1rem;
    padding: 0.55rem 0.7rem;
    cursor: pointer;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.tb-app-pick:hover {
    border-color: rgba(212, 175, 55, 0.55);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.tb-app-pick:has(input:checked) {
    border-color: #d4af37;
    background: linear-gradient(180deg, #fffdf8 0%, #fff6dc 100%);
    box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.28), 0 8px 18px rgba(184, 150, 46, 0.1);
}

.tb-app-insert {
    width: 100%;
    text-align: left;
    font: inherit;
    color: inherit;
}

.tb-app-insert:hover,
.tb-app-insert:focus-visible {
    border-color: #d4af37;
    background: #fffbeb;
}

.tb-app-pick input {
    width: 1.15rem;
    height: 1.15rem;
    margin: 0;
    flex: 0 0 auto;
    accent-color: #d4af37;
}

.tb-app-pick .tb-app-icon {
    width: 44px;
    height: 44px;
    border-radius: 0.85rem;
    box-shadow:
        inset 0 0 0 1px color-mix(in srgb, var(--tb-icon, #b8962e) 28%, #e8edf3),
        0 4px 10px rgba(15, 23, 42, 0.05);
}

.tb-app-pick .tb-app-icon svg {
    width: 24px;
    height: 24px;
}

.tb-app-pick .tb-app-icon i {
    font-size: 1.2rem;
}

.tb-app-pick > span:last-child {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
}

.tb-app-pick b {
    display: block;
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.25;
    color: #0f172a;
}

.tb-app-pick small {
    display: block;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 500;
    line-height: 1.35;
}

@media (hover: none) and (pointer: coarse) {
    .tabule-shell input,
    .tabule-shell textarea,
    .tb-text-body {
        font-size: 16px;
    }
}

@media (max-width: 1023px) {
    .tb-bar-main {
        flex-wrap: wrap;
        row-gap: 0.15rem;
    }

    .tb-brand strong,
    .tb-status,
    .tb-login-link span {
        display: none;
    }

    .tb-title {
        order: 2;
        flex: 1 1 auto;
        max-width: 7.5rem;
    }

    .tb-actions {
        order: 3;
        margin-left: auto;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .tb-tools {
        order: 4;
        flex: 1 0 100%;
    }

    .tb-btn-label {
        display: none;
    }

    .tb-browser,
    .tb-browser.is-web,
    .tb-browser.is-placed {
        top: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        left: 0 !important;
        width: auto !important;
        height: auto !important;
        border-radius: 0;
    }

    .tb-browser-grip,
    .tb-browser-resize {
        display: none !important;
    }

    .tb-browser-head {
        cursor: default;
        touch-action: auto;
    }

    .tb-browser-go {
        flex: 1 1 100%;
        order: 8;
    }
}

@media (max-width: 420px) {
    .tb-title {
        display: none;
    }

    .tb-actions {
        max-width: calc(100% - 3.4rem);
    }

    #tb-save,
    #tb-fs {
        position: sticky;
        right: 0;
        z-index: 2;
        background: rgba(255, 255, 255, 0.96);
    }

    #tb-save,
    #tb-share-open {
        right: 44px;
    }
}

.tb-readonly-back {
    position: absolute;
    z-index: 20;
    top: calc(0.65rem + env(safe-area-inset-top));
    left: 0.65rem;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 0 0.95rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    color: #0f172a;
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
}

.tb-readonly-back[hidden] {
    display: none !important;
}

.tb-readonly-back:hover,
.tb-readonly-back:focus-visible {
    border-color: rgba(212, 175, 55, 0.8);
    color: #8a7020;
}

.tabule-shell[data-readonly="1"] .tb-alert,
.tabule-shell[data-readonly="1"] .tb-bar,
.tabule-shell[data-readonly="1"] .tb-dock {
    display: none !important;
}

.tabule-shell[data-readonly="1"] .tb-tools,
.tabule-shell[data-readonly="1"] #tb-undo,
.tabule-shell[data-readonly="1"] #tb-new,
.tabule-shell[data-readonly="1"] #tb-folders,
.tabule-shell[data-readonly="1"] #tb-save,
.tabule-shell[data-readonly="1"] #tb-share-open,
.tabule-shell[data-readonly="1"] #tb-open-card,
.tabule-shell[data-readonly="1"] #tb-format,
.tabule-shell[data-readonly="1"] .tb-dock-add,
.tabule-shell[data-readonly="1"] .tb-item,
.tabule-shell[data-readonly="1"] .tb-text-body {
    cursor: auto;
}

.tabule-shell[data-readonly="1"] .tb-text-body {
    user-select: text;
    -webkit-user-select: text;
}

.tabule-shell[data-readonly="1"] #tb-open-card,
.tabule-shell[data-readonly="1"] #tb-game-insert,
.tabule-shell[data-readonly="1"] #tb-aq-insert,
.tabule-shell[data-readonly="1"] #tb-rz-insert,
.tabule-shell[data-readonly="1"] .tb-game-edit,
.tabule-shell[data-readonly="1"] .tb-aq-edit,
.tabule-shell[data-readonly="1"] .tb-rz-edit,
.tabule-shell[data-readonly="1"] .tb-del,
.tabule-shell[data-readonly="1"] .tb-resize,
.tabule-shell[data-readonly="1"] .tb-shape-handle,
.tabule-shell[data-readonly="1"] .tb-shape-rotate,
.tabule-shell[data-readonly="1"] .tb-shape-stem,
.tabule-shell[data-readonly="1"] #tb-shapes-open,
.tabule-shell[data-readonly="1"] #tb-shape-pop,
.tabule-shell[data-readonly="1"] #tb-text-pop,
.tabule-shell[data-readonly="1"] .tb-shape-box {
    display: none !important;
}

.tabule-shell[data-readonly="1"] .tb-title {
    pointer-events: none;
}

#tb-share-open {
    min-height: 44px;
}

#tb-share-list .tb-choice {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0.1rem;
}

#tb-share-list .tb-choice small {
    font-weight: 500;
    color: #64748b;
    font-size: 0.75rem;
}

.tb-share-week {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin: 0.15rem 0 0.45rem;
}

.tb-share-kicker {
    margin: 0.15rem 0 0.35rem;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #8a7020;
}

.tb-share-current {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    max-height: 18rem;
    overflow-y: auto;
    overscroll-behavior: contain;
    margin-bottom: 0.75rem;
}

.tb-share-live {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.45rem;
    min-width: 0;
    border: 1px solid rgba(212, 175, 55, 0.45);
    background: linear-gradient(180deg, #fffdf8, #fff);
    border-radius: 0.9rem;
    padding: 0.55rem 0.55rem 0.5rem 0.7rem;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.04);
}

.tb-share-live span {
    flex: 1 1 auto;
    min-width: 0;
}

.tb-share-live b,
.tb-share-live small {
    display: block;
    overflow-wrap: anywhere;
}

.tb-share-live b {
    font-size: 0.88rem;
    letter-spacing: -0.02em;
    color: #0f172a;
}

.tb-share-live small {
    margin-top: 0.1rem;
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 500;
}

.tb-share-clock {
    color: #8a7020;
    font-weight: 700;
}

.tb-share-live-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.tb-share-live-actions .tb-btn,
.tb-share-live-actions a.tb-btn {
    flex: 1 1 7rem;
    min-height: 44px;
    justify-content: center;
    text-decoration: none;
    text-align: center;
}

.tb-share-week strong {
    flex: 1;
    min-width: 0;
    text-align: center;
    font-size: 0.92rem;
    font-weight: 750;
    letter-spacing: -0.02em;
    color: #0f172a;
}

.tb-share-day {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
    margin: 0.85rem 0 0.35rem;
}

.tb-share-day b {
    font-size: 0.95rem;
    letter-spacing: -0.03em;
    color: #0f172a;
}

.tb-share-day span {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #8a7020;
    background: rgba(212, 175, 55, 0.16);
    border-radius: 999px;
    padding: 0.15rem 0.45rem;
}

.tb-share-pair {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 0.45rem;
    padding: 0.55rem;
    border-radius: 1rem;
    border: 1px dashed rgba(212, 175, 55, 0.7);
    background: linear-gradient(180deg, #fffdf8 0%, #fff 100%);
}

.tb-share-pair > p {
    margin: 0 0.15rem 0.1rem;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.35;
    color: #8a7020;
}

.tb-share-lesson {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    min-height: 4.2rem;
    margin: 0 0 0.4rem;
    padding: 0.6rem 0.7rem;
    border: 1px solid #e7edf3;
    border-radius: 1rem;
    background: #fff;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.tb-share-pair .tb-share-lesson {
    margin: 0;
}

.tb-share-lesson:has(input:checked) {
    border-color: #d4af37;
    background: linear-gradient(180deg, #fffdf8 0%, #fff6dc 100%);
    box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.28);
}

.tb-share-lesson input {
    width: 1.15rem;
    height: 1.15rem;
    margin: 0.15rem 0 0;
    flex: 0 0 auto;
    accent-color: #d4af37;
}

.tb-share-lesson span {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.08rem;
}

.tb-share-lesson b {
    font-size: 0.92rem;
    letter-spacing: -0.02em;
    color: #0f172a;
}

.tb-share-lesson small,
.tb-share-lesson em {
    font-style: normal;
    font-size: 0.78rem;
    line-height: 1.35;
    color: #64748b;
}

.tb-share-lesson em {
    color: #8a7020;
    font-weight: 650;
}

#tb-share-save:disabled {
    opacity: 0.45;
    cursor: default;
}

#tb-share-list {
    max-height: min(52vh, 24rem);
    overflow-y: auto;
}

#tb-share-prev:disabled,
#tb-share-next:disabled {
    opacity: 0.35;
}

.tb-doc {
    display: flex;
    flex-direction: column;
    overflow: visible;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 1rem;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.tb-doc > .tb-chrome {
    opacity: 1;
    pointer-events: auto;
    z-index: 30;
}

.tb-doc:not(.is-min) > .tb-chrome {
    top: 6px;
    right: 6px;
    bottom: auto;
}

.tb-doc:not(.is-min) .tb-doc-bar {
    padding-right: 9.6rem;
}

.tb-doc-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
}

.tb-doc-bar {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 44px;
    padding: 0.35rem 0.7rem;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    cursor: grab;
}

.tb-doc-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.7rem;
    color: #fff;
    background: linear-gradient(160deg, #e4c56a, #b8962e);
    flex: none;
}

.tb-doc-spreadsheet .tb-doc-mark { background: linear-gradient(160deg, #34d399, #047857); }
.tb-doc-presentation .tb-doc-mark { background: linear-gradient(160deg, #60a5fa, #1d4ed8); }
.tb-doc-pdf .tb-doc-mark { background: linear-gradient(160deg, #f87171, #b91c1c); }

.tb-doc-names {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.tb-doc-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #0f172a;
}

.tb-doc-kind {
    color: #64748b;
    font-size: 0.75rem;
}

.tb-doc-view {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    background: #f8fafc;
    border-radius: 0 0 1rem 1rem;
}

.tb-doc-frame {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    background: #fff;
}

.tb-doc.is-max {
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    box-shadow: none;
    min-width: 0;
}

.tb-doc.is-max > .tb-chrome {
    z-index: 40;
}

.tb-doc.is-max .tb-doc-view {
    border-radius: 0;
}

.tb-doc.is-min {
    min-width: 0 !important;
    overflow: visible;
}

.tb-doc.is-min .tb-minibar {
    gap: 0.35rem;
    min-height: 40px;
    padding: 0.15rem 0.5rem 0.2rem;
}

.tb-doc.is-min .tb-minibar i {
    flex: none;
    width: 1rem;
    text-align: center;
    color: #b8962e;
}

.tb-doc-spreadsheet.is-min .tb-minibar i { color: #047857; }
.tb-doc-presentation.is-min .tb-minibar i { color: #1d4ed8; }
.tb-doc-pdf.is-min .tb-minibar i { color: #b91c1c; }

.tb-doc.is-min .tb-minibar-title {
    max-width: none;
    overflow: visible;
    text-overflow: clip;
    font-size: 0.82rem;
}

.tb-doc-list {
    max-height: 14rem;
    overflow-y: auto;
}

#tb-dlg-docs .tb-choice span {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
    text-align: left;
}

#tb-dlg-docs .tb-choice small {
    font-weight: 500;
    color: #64748b;
    font-size: 0.75rem;
}
