/*
 * `animeworld` theme — Watch2gether (lobby, my rooms, create, room). animeworld.ac has no such screens: they are
 * built from its own boxes (div.widget, div.film-list, .btn, .form-control, the player widget and its #controls —
 * all styled by the vendored all.css / dark.css) and this file adds what those lack. Every rule is scoped to
 * `.aw-w2g` (the root of the four pages), an `aw-w2g-` / `aw-room` / `aw-chat-` class or `#app.w2g-*`.
 * Colours are animeworld's (light: #367dc3 accent, #eee rules, #555 / #8c8c8c text; dark: body.dark — #222 boxes,
 * #888 text), with a `body.dark` twin wherever a rule sets a box or a text colour.
 *
 *   1. Shared      head + status tabs, labels, chips, episode cells, notes, spinner, the dot
 *   2. Lobby       intro, room cards (film-list items), pager, empty state
 *   3. Modals      the anime picker, the end-room dialog
 *   4. Anime box   poster + title + meta + plot
 *   5. Create      the form, "Come funziona"
 *   6. Room        head, stage, controls, servers, host panel
 *   7. Chat        rows, composer, emoji / reactions
 *   8. Members
 *   9. One column  the room's order at ≤ 800px
 */

/* 1. Shared ------------------------------------------------------------------------------------------------------ */
.aw-w2g .aw-w2g-head h1.title { margin: 0; }
/* The status tabs: animeworld's `.widget .widget-title .tabs .tab` (see partials/w2g/strip for why not its classes). */
.aw-w2g-tabs { margin-left: 10px; }
.aw-w2g-tabs .aw-w2g-tab { display: inline-block; padding: 6px 7px; border-bottom: 2px solid rgba(0, 0, 0, 0); cursor: pointer; font-family: "Nunito Sans", sans-serif; color: inherit; }
.aw-w2g-tabs .aw-w2g-tab:hover { color: #367dc3; border-bottom: 2px solid #eee; text-decoration: none; }
.aw-w2g-tabs .aw-w2g-tab.active { border-bottom: 2px solid #2b6cad; }
body.dark .aw-w2g-tabs .aw-w2g-tab { color: #8e8c8c; }
body.dark .aw-w2g-tabs .aw-w2g-tab.active { color: #888; }
body.dark .aw-w2g-tabs .aw-w2g-tab:hover { border-bottom-color: #484848; }
@media screen and (max-width: 600px) { .aw-w2g-tabs { display: block; clear: both; margin-left: -7px; white-space: nowrap; overflow-x: auto; scrollbar-width: none; } }

.aw-w2g .aw-w2g-field { margin-bottom: 16px; }
.aw-w2g .aw-w2g-lbl { display: block; margin: 0 0 6px; font-family: "Nunito Sans", sans-serif; font-size: 1rem; font-weight: 600; color: #555; }
.aw-w2g .aw-w2g-lbl b { color: #367dc3; }
.aw-w2g .aw-w2g-lbl small { margin-left: 4px; font-size: .9rem; font-weight: 400; color: #8c8c8c; }
.aw-w2g .aw-w2g-note { margin: 6px 0 0; font-size: .9rem; color: #8c8c8c; }
body.dark .aw-w2g .aw-w2g-lbl { color: #b3b2b2; }
body.dark .aw-w2g .aw-w2g-lbl small, body.dark .aw-w2g .aw-w2g-note { color: #6d6d6d; }

/* Option chips: animeworld's episode-range chips (`.widget.servers .range > span`). */
.aw-w2g-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.aw-w2g .aw-w2g-pill { display: inline-block; padding: 2px 10px; border: 0; border-radius: 2px; background: #ccc; color: #fff; font-family: inherit; font-size: .95rem; font-weight: 300; line-height: 1.6; cursor: pointer; }
.aw-w2g .aw-w2g-pill:hover { background: #b3b3b3; color: #fff; text-decoration: none; }
.aw-w2g .aw-w2g-pill.active { background: #5fa4e6; color: #fff; }
.aw-w2g .aw-w2g-pill.disabled, .aw-w2g .aw-w2g-pill:disabled { opacity: .45; cursor: not-allowed; }
.aw-w2g .aw-w2g-pill.disabled:hover, .aw-w2g .aw-w2g-pill:disabled:hover { background: #ccc; }
.aw-w2g .aw-w2g-pill:focus-visible { outline: 2px solid #367dc3; outline-offset: 1px; }
body.dark .aw-w2g .aw-w2g-pill { background: #312e2e; color: #888; }
body.dark .aw-w2g .aw-w2g-pill:hover { background: #2b2828; color: #888; }
body.dark .aw-w2g .aw-w2g-pill.active { background: #165fa7; color: #a2a2a2; }
body.dark .aw-w2g .aw-w2g-pill.disabled:hover, body.dark .aw-w2g .aw-w2g-pill:disabled:hover { background: #312e2e; }

/* Episode cells: animeworld's `.widget.servers ul.episodes li a`. */
.aw-w2g-eps { max-height: 190px; margin: 8px -4px 0; overflow-y: auto; scrollbar-width: thin; }
.aw-w2g .aw-w2g-ep { display: inline-block; height: 28px; min-width: 38px; margin: 4px; padding: 0 8px; border-bottom: 1px solid #eee; border-radius: 3px; background: #eee; color: #8c8c8c; font-family: sans-serif; font-size: 1.05rem; font-weight: 300; line-height: 28px; text-align: center; }
.aw-w2g .aw-w2g-ep:hover { background: #e2e2e2; text-decoration: none; }
.aw-w2g .aw-w2g-ep.active { background-color: #367dc3; border-color: #367dc3; color: #fff; }
.aw-w2g .aw-w2g-ep.highlight { box-shadow: 0 0 0 2px #5fa4e6; }
.aw-w2g .aw-w2g-ep.is-busy { opacity: .5; pointer-events: none; }
body.dark .aw-w2g .aw-w2g-ep { background: #303030; color: #747474; border: none; }
body.dark .aw-w2g .aw-w2g-ep.active, body.dark .aw-w2g .aw-w2g-ep:hover { background: #367dc3; color: #ddd; }

.aw-w2g .aw-w2g-search, .aw-w2g-modal .aw-w2g-search { position: relative; flex-wrap: nowrap; }
.aw-w2g .aw-w2g-search .input-group-text, .aw-w2g-modal .aw-w2g-search .input-group-text, .aw-w2g-form .input-group-text { height: 32px; padding: 0 11px; border: 1px solid #eee; border-right: 0; border-radius: 3px 0 0 3px; background: #eee; color: #8c8c8c; font-size: 1rem; }
.aw-w2g .aw-w2g-search-sm { max-width: 320px; }
.aw-w2g .aw-w2g-ep-clear { position: absolute; top: 0; right: 0; z-index: 4; width: 30px; height: 32px; line-height: 32px; text-align: center; color: #8c8c8c; }
.aw-w2g .aw-w2g-ep-clear:hover { color: #367dc3; }
body.dark .aw-w2g .aw-w2g-search .input-group-text, body.dark .aw-w2g-modal .aw-w2g-search .input-group-text, body.dark .aw-w2g-form .input-group-text { border-color: #2f2f2f; background: #292929; color: #888; }

.aw-w2g-spin { display: inline-block; width: 18px; height: 18px; border: 2px solid #367dc3; border-right-color: transparent; border-radius: 50%; vertical-align: middle; animation: aw-w2g-spin .75s linear infinite; }
.aw-dot { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: currentColor; vertical-align: 1px; }
.aw-w2g-sep { margin: 0 6px; color: #b5b5b5; }
.aw-w2g .aw-none, .aw-w2g .aw-none.control { display: none !important; }
@keyframes aw-w2g-spin { to { transform: rotate(360deg); } }
@keyframes aw-w2g-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes aw-w2g-fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes aw-w2g-float { 0% { opacity: 0; transform: translateY(0) scale(.6); } 15% { opacity: 1; transform: translateY(-20px) scale(1); } 100% { opacity: 0; transform: translateY(-220px) scale(1.1); } }

/* 2. Lobby ------------------------------------------------------------------------------------------------------- */
.aw-w2g-intro { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid #eee; }
.aw-w2g-intro p { flex: 1 1 260px; margin: 0; color: #8c8c8c; }
.aw-w2g-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.aw-w2g .btn i { margin-right: 3px; font-size: .9em; }
body.dark .aw-w2g-intro { border-color: rgba(51, 51, 51, .84); }
body.dark .aw-w2g-intro p { color: #888; }

.aw-w2g-body { min-height: 120px; transition: opacity .15s; }
.aw-w2g-body.is-loading { opacity: .45; pointer-events: none; }
.aw-room.w2g-fade { animation: aw-w2g-fade .25s ease-out; }
/* The card is animeworld's poster card; only the room-specific pieces are drawn here. */
.film-list .aw-room .inner .poster { background: #1d1d1d; }
.film-list .aw-room .inner .poster img { object-fit: cover; }
.film-list .aw-room.is-ended .inner .poster img { filter: grayscale(.7) brightness(.8); }
.aw-room-chips { position: absolute; top: 5px; left: 5px; z-index: 1; display: flex; gap: 4px; }
.aw-room-chip { padding: 1px 6px; border-radius: 2px; background: rgba(0, 0, 0, .65); color: #eee; font-family: "Nunito Sans", sans-serif; font-size: .8rem; line-height: 1.6; }
.film-list .aw-room .inner .poster .status .aw-room-st { white-space: nowrap; }
.film-list .aw-room .inner .poster .status .aw-room-st.is-live { border-bottom-color: #d9534f; }
.film-list .aw-room .inner .poster .status .aw-room-st.is-waiting { border-bottom-color: #cf8a00; }
.film-list .aw-room .inner .poster .status .aw-room-st.is-ended { border-bottom-color: #777; }
.film-list .aw-room .inner .poster .status .aw-room-st b { font-weight: 400; font-variant-numeric: tabular-nums; }
.film-list .aw-room .inner .poster .status .aw-room-st i { font-size: .8rem; }
.film-list .aw-room .inner .name { height: 35px; }
.aw-room-meta { height: 34px; margin-top: 2px; overflow: hidden; text-align: center; font-size: .85rem; line-height: 17px; color: #8c8c8c; }
.aw-room-meta > * { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aw-room-meta .aw-room-anime { color: #8c8c8c; }
.aw-room-meta .aw-room-anime:hover { color: #367dc3; }
body.dark .aw-room-meta, body.dark .aw-room-meta .aw-room-anime { color: #6d6d6d; }
body.dark .aw-room-meta .aw-room-anime:hover { color: #ddd; }

.aw-w2g-pager { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 14px auto 6px; padding: 0; color: #909090; }
.aw-w2g-pager .btn { min-width: 28px; }
.aw-w2g-pager .btn.disabled { opacity: .45; pointer-events: none; }
.aw-w2g-pager .total { color: #367dc3; }

.aw-w2g-empty { padding: 30px 10px; text-align: center; font-family: "Nunito Sans", sans-serif; }
.aw-w2g-empty-title { margin: 0 0 4px; font-size: 1.2rem; font-weight: 600; color: #555; }
.aw-w2g-empty-text { margin: 0 0 12px; color: #8c8c8c; }
body.dark .aw-w2g-empty-title { color: #b3b2b2; }

/* 3. Modals ------------------------------------------------------------------------------------------------------ */
/* A Bootstrap modal whose content is one animeworld widget. */
.aw-w2g-modal { font-family: Roobert, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 13px; }
.aw-w2g-modal .aw-w2g-dialog { max-width: 550px; margin: 30px auto; padding: 0 10px; }
.aw-w2g-modal .aw-w2g-dialog-sm { max-width: 420px; }
.aw-w2g-modal .modal-content { border: 0; border-radius: 3px; background: transparent; box-shadow: 0 5px 25px rgba(0, 0, 0, .45); }
.aw-w2g-modal .modal-content > .widget { margin-bottom: 0; }
.aw-w2g-modal .aw-w2g-close { float: right; margin: 0; padding: 4px 4px; border: 0; background: none; font-size: 22px; line-height: 27px; color: #8c8c8c; opacity: 1; text-shadow: none; }
.aw-w2g-modal .aw-w2g-close:hover { color: #367dc3; opacity: 1; }
.aw-w2g-pick-lead { margin: 0 0 8px; color: #8c8c8c; }
.aw-w2g-picklist { max-height: min(52vh, 420px); margin: 10px -10px 0; overflow-y: auto; scrollbar-width: thin; }
.aw-w2g-pick-row { border-bottom: 1px solid #eee; cursor: pointer; }
.aw-w2g-pick-row:last-child { border-bottom: 0; }
.aw-w2g-pick-row > a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; }
.aw-w2g-pick-row:hover { background: #f6f6f6; }
.aw-w2g-pick-row > a:hover { text-decoration: none; }
.aw-w2g-pick-img { flex: 0 0 45px; width: 45px; height: 60px; overflow: hidden; border-radius: 3px; background: #eee; }
.aw-w2g-pick-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.aw-w2g-pick-name { min-width: 0; }
.aw-w2g-pick-title { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 1.1rem; font-weight: 500; color: #555; }
.aw-w2g-pick-row:hover .aw-w2g-pick-title { color: #367dc3; }
.aw-w2g-pick-info { display: block; font-size: .9rem; color: #8c8c8c; }
.aw-w2g-pick-row.is-current { background: #f1f6fc; }
.aw-w2g-pick-empty, .aw-w2g-pick-loading { margin: 0; padding: 18px 10px 8px; text-align: center; color: #8c8c8c; }
.aw-w2g-end-msg { margin: 4px 0 14px; color: #555; }
.aw-w2g-end-acts { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
body.dark .aw-w2g-pick-row { border-color: rgba(51, 51, 51, .84); }
body.dark .aw-w2g-pick-row:hover { background: #1c1c1c; }
body.dark .aw-w2g-pick-row.is-current { background: #1d2733; }
body.dark .aw-w2g-pick-img { background: #303030; }
body.dark .aw-w2g-pick-title { color: #888; }
body.dark .aw-w2g-pick-row:hover .aw-w2g-pick-title { color: #ddd; }
body.dark .aw-w2g-pick-info { color: #6d6d6d; }
body.dark .aw-w2g-end-msg { color: #c3bfbf; }
@media (max-width: 575px) { .aw-w2g-modal .aw-w2g-dialog { margin: 10px auto; } }

/* 4. Anime box --------------------------------------------------------------------------------------------------- */
.aw-w2g-anime { display: flex; gap: 12px; align-items: flex-start; }
.aw-w2g-anime-img { flex: 0 0 105px; width: 105px; height: 150px; overflow: hidden; border-radius: 3px; background: #eee; }
.aw-w2g-anime-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.aw-w2g-anime-txt { flex: 1 1 auto; min-width: 0; font-family: "Nunito Sans", sans-serif; }
.aw-w2g-anime-title { display: block; margin-bottom: 3px; font-size: 1.2rem; font-weight: 600; text-transform: uppercase; color: #367dc3; }
.aw-w2g-anime-title:hover { color: #2b649c; }
.aw-w2g-anime-info { display: flex; flex-wrap: wrap; gap: 2px 0; font-size: .93rem; color: #8c8c8c; }
.aw-w2g-anime-info span:not(:last-child)::after { content: "·"; margin: 0 6px; color: #b5b5b5; }
.aw-w2g-anime-plot { margin: 6px 0 0; color: #8c8c8c; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.aw-w2g-anime-acts { margin-top: 8px; }
body.dark .aw-w2g-anime-img { background: #303030; }
body.dark .aw-w2g-anime-title { color: #ccc8c8; }
body.dark .aw-w2g-anime-title:hover { color: #fff; }
body.dark .aw-w2g-anime-info, body.dark .aw-w2g-anime-plot { color: #888; }
@media (max-width: 420px) { .aw-w2g-anime-img { flex-basis: 80px; width: 80px; height: 114px; } }

/* 5. Create ------------------------------------------------------------------------------------------------------ */
.aw-w2g-create .aw-w2g-active { margin-bottom: 15px; }
body.dark .aw-w2g-create .aw-w2g-active { background-color: #3a3520; border-color: #4d4526; color: #d8c98a; }
body.dark .aw-w2g-create .aw-w2g-active .alert-link { color: #efe2a8; }
body.dark .aw-w2g-alert .alert-danger { background-color: #3a2023; border-color: #55292e; color: #e7a6ad; }
body.dark .aw-w2g-alert .alert-success { background-color: #1f3524; border-color: #2c4a33; color: #9fd6a6; }
.aw-w2g-form .form-control[type="date"], .aw-w2g-form .form-control[type="time"] { cursor: pointer; }
.aw-w2g-ep-title { overflow: hidden; text-overflow: ellipsis; }
.aw-w2g-schedule { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.aw-w2g-schedule > div { flex: 1 1 140px; max-width: 220px; }
.aw-w2g-schedule[hidden] { display: none; }
.aw-w2g-alert .alert { margin: 0 0 12px; padding: 8px 12px; font-family: "Nunito Sans", sans-serif; }
.aw-w2g-alert .alert i { margin-right: 4px; }
.aw-w2g-submit { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 12px; border-top: 1px solid #eee; }
body.dark .aw-w2g-submit { border-color: rgba(51, 51, 51, .84); }

.aw-w2g-steps { margin: 0 0 12px; padding: 0; list-style: none; }
.aw-w2g-steps li { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid #eee; }
.aw-w2g-steps li:last-child { border-bottom: 0; }
.aw-w2g-steps li > b { flex: 0 0 22px; width: 22px; height: 22px; border-radius: 50%; background: #367dc3; color: #fff; font-family: "Nunito Sans", sans-serif; font-size: 12px; font-weight: 600; line-height: 22px; text-align: center; }
.aw-w2g-steps strong { display: block; font-family: "Nunito Sans", sans-serif; font-size: 1.05rem; font-weight: 600; color: #555; }
.aw-w2g-steps span { display: block; margin-top: 1px; font-size: .93rem; line-height: 1.45; color: #8c8c8c; }
.aw-w2g-howto .widget-body > .aw-w2g-steps:last-child { margin-bottom: 0; }
.aw-w2g .aw-w2g-block { display: block; width: 100%; }
body.dark .aw-w2g-steps li { border-color: rgba(51, 51, 51, .84); }
body.dark .aw-w2g-steps strong { color: #b3b2b2; }
body.dark .aw-w2g-steps span { color: #6d6d6d; }

/* 6. Room -------------------------------------------------------------------------------------------------------- */
/* Head: animeworld's player title bar (h1.title, one line) + the state at the right. */
.aw-w2g-room .aw-w2g-roomhead { display: flex; align-items: center; gap: 10px; }
.aw-w2g-room .widget.player .aw-w2g-roomhead h1.title { flex: 1 1 auto; width: auto; min-width: 0; }
.aw-w2g-state { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; padding: 3px 0; font-family: "Nunito Sans", sans-serif; line-height: 1.25; text-align: right; white-space: nowrap; }
.aw-w2g-state-top { font-size: .95rem; font-weight: 600; color: #555; }
.aw-w2g-state-top strong { font-weight: 700; }
.aw-w2g-state.is-live .aw-dot { color: #d9534f; animation: aw-w2g-pulse 1.4s ease-in-out infinite; }
.aw-w2g-state.is-sched .aw-dot { color: #367dc3; }
.aw-w2g-state.is-waiting .aw-dot { color: #cf8a00; }
.aw-w2g-state.is-ended .aw-dot { color: #999; }
.aw-w2g-clock { margin-left: 6px; font-weight: 400; font-variant-numeric: tabular-nums; color: #8c8c8c; }
.aw-w2g-state:not(.is-live):not(.is-ended) .aw-w2g-clock { display: none; }
.aw-w2g-state-sub { font-size: .8rem; color: #8c8c8c; }
.aw-w2g-state-sub b { font-weight: 600; color: #555; }
.aw-w2g-state-sub .is-off { color: #d9534f; }
.aw-w2g-roomsub { padding: 0 10px 8px; font-family: "Nunito Sans", sans-serif; font-size: .93rem; color: #8c8c8c; }
.aw-w2g-roomsub a { color: #367dc3; }
.aw-w2g-roomsub a:hover { color: #2b649c; }
.aw-w2g-private i { font-size: .8rem; }
body.dark .aw-w2g-state-top, body.dark .aw-w2g-state-sub b { color: #c3bfbf; }
body.dark .aw-w2g-state-sub, body.dark .aw-w2g-clock, body.dark .aw-w2g-roomsub { color: #888; }
body.dark .aw-w2g-roomsub a { color: #74b7f9; }
body.dark .aw-w2g-sep { color: #555; }

/* Stage: animeworld's `.player-box` (its height per width) with the room's layers filling it. */
.aw-w2g-stage { overflow: hidden; background: #000; }
.aw-w2g-cover { position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 1; background-color: #000; background-position: center; background-size: cover; opacity: .3; }
.aw-w2g #player-container { position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 2; width: auto; height: auto; background: #000; }
.aw-w2g #player-container iframe { position: absolute; top: 0; left: 0; width: 100% !important; height: 100% !important; border: 0; }
/* The engine's loader: .loader > .loading > .span1-3 (+ .is-error > .loader-message). */
.aw-w2g #player-container .loader { position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 3; background: #000; }
.aw-w2g #player-container .loader .loading { position: absolute; top: 50%; left: 50%; display: block; width: 36px; height: 36px; margin: -18px 0 0 -18px; border: 3px solid rgba(255, 255, 255, .15); border-top-color: #367dc3; border-radius: 50%; background: none; animation: aw-w2g-spin .8s linear infinite; }
.aw-w2g #player-container .loader .loading > div { display: none; }
.aw-w2g #player-container .loader-message { position: absolute; top: 50%; left: 0; right: 0; transform: translateY(-50%); padding: 0 20px; color: #fff; font-size: 15px; font-weight: 600; text-align: center; text-shadow: 0 1px 2px #000; }

/* Waiting / ended screen and the join gate: a centred notice over the dimmed art. */
.aw-w2g-screen, .aw-w2g-gate { position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 4; overflow: hidden; color: #fff; text-align: center; font-family: "Nunito Sans", sans-serif; }
.aw-w2g-screen { background: rgba(0, 0, 0, .35); }
.aw-w2g-gate { z-index: 5; background: rgba(0, 0, 0, .86); }
.aw-w2g-gate[hidden] { display: none; }
.aw-w2g-notice { position: absolute; top: 50%; left: 0; right: 0; transform: translateY(-50%); padding: 0 20px; }
.aw-w2g-hostav { display: block; width: 56px; height: 56px; margin: 0 auto 10px; object-fit: cover; background: #333; border-radius: 50%; box-shadow: 0 0 18px rgba(0, 0, 0, .35); }
.aw-w2g .aw-w2g-screen-sub { margin: 0; font-size: 14px; font-weight: 600; text-shadow: 0 1px 2px #000; }
.aw-w2g-screen-name { display: block; margin-top: 2px; font-size: 18px; font-weight: 700; text-shadow: 0 1px 2px #000; }
.aw-w2g-cd { margin-top: 12px; }
.aw-w2g-cd-lbl { display: block; font-size: 11px; font-weight: 700; letter-spacing: .06rem; text-transform: uppercase; opacity: .85; }
.aw-w2g-cd-digits { display: block; font-size: 36px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; text-shadow: 0 1px 2px #000; }
.aw-w2g-cd-when { display: block; font-size: 12px; opacity: .85; }
.aw-w2g-share { display: flex !important; align-items: center; gap: 8px; max-width: 440px; margin: 14px auto 0; padding: 4px 4px 4px 12px; font-size: 12px; text-align: left; white-space: nowrap; background: rgba(0, 0, 0, .7); border-radius: 3px; }
.aw-w2g-share[style*="display: none"] { display: none !important; }
.aw-w2g-link { flex: 1 1 auto; overflow: hidden; color: #d1d5db; text-overflow: ellipsis; user-select: all; }
.aw-w2g .aw-w2g-copy { flex: 0 0 auto; height: 24px; padding: 0 10px; border-radius: 2px; background: #367dc3; color: #fff; font-weight: 600; line-height: 24px; }
.aw-w2g .aw-w2g-copy:hover { background: #2868a7; text-decoration: none; }
.aw-w2g .aw-w2g-start, .aw-w2g .aw-w2g-back { margin-top: 14px; }
.aw-w2g .aw-w2g-wait { margin: 14px 0 0; font-size: 13px; font-weight: 600; text-shadow: 0 1px 2px #000; }
.aw-w2g-wait .aw-dot { color: #cf8a00; animation: aw-w2g-pulse 1.4s ease-in-out infinite; }
.aw-w2g-play { display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px; margin-bottom: 10px; padding: 0 0 0 4px; font-size: 22px; color: #fff; background: #367dc3; border: 0; border-radius: 50%; cursor: pointer; box-shadow: 0 2px 16px rgba(54, 125, 195, .55); transition: transform .15s; }
.aw-w2g-play:hover { transform: scale(1.05); }
@media (max-width: 575px) {
    .aw-w2g-hostav { width: 40px; height: 40px; margin-bottom: 6px; }
    .aw-w2g-screen-name { font-size: 15px; }
    .aw-w2g .aw-w2g-screen-sub { font-size: 12px; }
    .aw-w2g-cd { margin-top: 6px; }
    .aw-w2g-cd-digits { font-size: 26px; }
    .aw-w2g-share { margin-top: 8px; }
    .aw-w2g .aw-w2g-start, .aw-w2g .aw-w2g-back, .aw-w2g .aw-w2g-wait { margin-top: 8px; }
    .aw-w2g-play { width: 50px; height: 50px; font-size: 18px; margin-bottom: 6px; }
}
@media (max-width: 400px) { .aw-w2g-hostav, .aw-w2g-cd-when { display: none; } }

/* Floating reactions. */
.aw-w2g-reactions { position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 6; overflow: hidden; pointer-events: none; }
.aw-w2g .w2g-float { position: absolute; bottom: 20px; display: flex; flex-direction: column; align-items: center; animation: aw-w2g-float 3s ease-out forwards; }
.aw-w2g .w2g-float-emoji { font-size: 34px; line-height: 1; }
.aw-w2g .w2g-float-name { max-width: 90px; margin-top: 4px; padding: 1px 6px; overflow: hidden; font-size: 10px; font-weight: 700; color: #fff; text-overflow: ellipsis; white-space: nowrap; background: rgba(0, 0, 0, .7); border-radius: 3px; }

/* Controls: animeworld's `.widget.player #controls .control`; links here, so no underline, and the off state. */
/* fidelity pass 3: the row is the theme's icon-tile row (css/aw-watch.css `.widget.player #controls`: flex, 36px tiles,
   labels in span.aw-lbl) — the room keeps that and pushes its version / viewers note to the right. */
.aw-w2g-room .widget.player #controls { display: flex; }
.aw-w2g-room .widget.player #controls .control.aw-host-live.aw-none { display: none; }
.aw-w2g-room .widget.player #controls a.control:hover { text-decoration: none; }
.aw-w2g-room .widget.player #controls .control.aw-off { color: #bbb; cursor: not-allowed; pointer-events: none; }
.aw-w2g-room .widget.player #controls .control .fas { font-size: .95rem; }
.aw-w2g-room .widget.player #controls .control.aw-w2g-danger-lnk:hover { color: #d9534f; }
.aw-w2g-room .widget.player #controls .aw-w2g-chatlnk { display: none; }
.aw-w2g-vt-info { float: none; margin-left: auto; height: 36px; padding: 0 2px 0 10px; line-height: 36px; font-family: "Nunito Sans", sans-serif; font-size: .95rem; color: #8c8c8c; white-space: nowrap; }
.aw-w2g-vt-info b { font-weight: 600; color: #555; }
body.dark .aw-w2g-room .widget.player #controls .control.aw-off { color: #484848; }
body.dark .aw-w2g-room .widget.player #controls .control.aw-off .icon { color: #484848 !important; }
body.dark .aw-w2g-vt-info { color: #888; }
body.dark .aw-w2g-vt-info b { color: #c3bfbf; }


/* Servers: animeworld's server tabs (`.widget.servers .widget-title .tabs .tab`) as a list of links. */
.aw-w2g-srv[hidden] { display: none; }
.aw-w2g-srv .widget-title { border-bottom: 0; }
.aw-w2g-srv-lang { display: inline-block; margin-right: 6px; padding: 1px 6px; border-radius: 2px; background: #367dc3; color: #fff; font-size: .8rem; font-weight: 500; vertical-align: 1px; }
.aw-w2g .aw-w2g-srvlist { display: inline; margin: 0; padding: 0; list-style: none; }
.aw-w2g .aw-w2g-srvlist li { display: inline-block; }
.aw-w2g .aw-w2g-srvlist li a { display: inline-block; margin: 4px 4px 0; padding: 6px 7px; border-bottom: 2px solid rgba(0, 0, 0, 0); font-family: "Nunito Sans", sans-serif; color: inherit; }
.aw-w2g .aw-w2g-srvlist li a:hover { color: #367dc3; border-bottom: 2px solid #eee; text-decoration: none; }
.aw-w2g .aw-w2g-srvlist li.active a { border-bottom: 2px solid #2b6cad; }
.aw-w2g .aw-w2g-srvlist li.disabled a { opacity: .5; cursor: not-allowed; }
.aw-w2g .aw-w2g-srvlist li.disabled a:hover { color: inherit; border-bottom-color: rgba(0, 0, 0, 0); }
.aw-w2g .aw-w2g-srvlist.aw-ro li:not(.active) a { cursor: default; }
.aw-w2g-srvlist .fas { font-size: .75rem; }
.aw-w2g-srv-note { display: block; padding: 8px 10px; border-top: 1px solid #eee; font-size: .9rem; color: #8c8c8c; }
.aw-w2g-srv-note[hidden] { display: none; }
body.dark .aw-w2g .aw-w2g-srvlist li a { color: #8e8c8c; }
body.dark .aw-w2g .aw-w2g-srvlist li.active a { color: #888; }
body.dark .aw-w2g .aw-w2g-srvlist li a:hover { border-bottom-color: #484848; }
body.dark .aw-w2g-srv-note { border-color: rgba(51, 51, 51, .84); color: #6d6d6d; }

/* Host panel. */
.aw-w2g-host .aw-w2g-eps { max-height: 172px; }
.aw-w2g-check { display: flex; flex-wrap: wrap; align-items: center; gap: 0 6px; }
.aw-w2g-check .aw-w2g-toggle { line-height: 1; }
.aw-w2g-check .aw-w2g-toggle .switch { margin: 0; vertical-align: middle; }
.aw-w2g-check .aw-w2g-check-lbl { margin: 0; font-family: "Nunito Sans", sans-serif; font-size: 1rem; font-weight: 600; color: #555; cursor: pointer; }
.aw-w2g-check .aw-w2g-note { flex: 1 1 100%; }
.aw-w2g-hfoot { display: flex; justify-content: flex-end; padding-top: 12px; border-top: 1px solid #eee; }
body.dark .aw-w2g-check .aw-w2g-check-lbl { color: #b3b2b2; }
body.dark .aw-w2g-check .aw-w2g-toggle .slider { background: #484848; }
body.dark .aw-w2g-hfoot { border-color: rgba(51, 51, 51, .84); }

/* 7. Chat -------------------------------------------------------------------------------------------------------- */
.aw-w2g-chatbox { display: flex; flex-direction: column; height: 520px; overflow: visible; }
.aw-w2g-chatbox > .widget-title { flex: 0 0 auto; }
.aw-w2g-viewcount, .aw-w2g-count { float: right; line-height: 35px; font-family: "Nunito Sans", sans-serif; font-size: .9rem; color: #8c8c8c; white-space: nowrap; }
.aw-w2g-viewcount b, .aw-w2g-count { font-weight: 600; color: #555; }
.aw-w2g-chat { position: relative; display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; }
.aw-chat-scroll { flex: 1 1 auto; min-height: 0; padding: 6px 0; overflow-y: auto; scrollbar-width: thin; }
.aw-chat-list:empty { display: none; }
.aw-w2g .aw-chat-empty { display: none; margin: 0; padding: 30px 20px; text-align: center; color: #8c8c8c; }
.aw-w2g .aw-chat-list:empty + .aw-chat-empty { display: block; }
/* Rows (watch2gather.js buildMessage tree). */
.aw-w2g #messages-list .message { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 8px; margin: 0; padding: 6px 10px; border: 0; background: none; }
.aw-w2g #messages-list .message.self { background: #f1f6fc; }
.aw-w2g #messages-list .avatar { width: 32px; height: 32px; overflow: hidden; background: #eee; border-radius: 50%; }
.aw-w2g #messages-list .avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.aw-w2g #messages-list .msg-body { min-width: 0; }
.aw-w2g #messages-list .user { display: flex; align-items: baseline; gap: 6px; line-height: 1.3; }
.aw-w2g #messages-list .name { overflow: hidden; font-family: "Nunito Sans", sans-serif; font-size: .95rem; font-weight: 700; color: #555; text-overflow: ellipsis; white-space: nowrap; }
.aw-w2g #messages-list .owner .name { color: #367dc3; }
.aw-w2g #messages-list .staff .name { color: #cf8a00; }
.aw-w2g #messages-list .rank-label { flex: 0 0 auto; padding: 1px 5px; border-radius: 2px; background: #eee; color: #8c8c8c; font-size: 9px; font-weight: 700; line-height: 1.4; text-transform: uppercase; }
.aw-w2g #messages-list .msg-time { flex: 0 0 auto; margin-left: auto; font-size: .8rem; color: #8c8c8c; }
.aw-w2g #messages-list .text { margin-top: 1px; font-size: 1rem; line-height: 1.45; color: #555; overflow-wrap: anywhere; white-space: pre-wrap; }
.aw-w2g .room-chat .event { display: block; width: auto; margin: 6px 10px; padding: 0; border: 0; background: none; font-size: .85rem; font-style: italic; text-align: center; color: #8c8c8c; }
.aw-w2g .room-chat .load-more-msg { display: block; margin: 4px auto 8px; padding: 3px 10px; border-radius: 2px; background: #efefef; color: #333; font-style: normal; cursor: pointer; }
.aw-w2g .room-chat .load-more-msg:hover { background: #367dc3; color: #fff; }
.aw-chat-pill { position: absolute; left: 50%; bottom: 100px; z-index: 3; transform: translateX(-50%); padding: 3px 12px; border-radius: 12px; background: #367dc3; color: #fff; font-size: 12px; font-weight: 600; white-space: nowrap; cursor: pointer; box-shadow: 0 2px 6px rgba(0, 0, 0, .25); }
.aw-chat-offline { flex: 0 0 auto; margin: 0 10px 8px; padding: 6px 10px; border-radius: 3px; background: #f8d7da; color: #721c24; font-size: 12px; }
/* Composer. */
.aw-chat-composer { position: relative; flex: 0 0 auto; padding: 10px; border-top: 1px solid #eee; }
.aw-w2g #message { display: block; height: 36px; min-height: 36px; max-height: 120px; padding: 8px 12px; line-height: 1.45; resize: none; }
.aw-w2g #message:disabled { opacity: .6; }
.aw-chat-bar { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.aw-w2g .aw-chat-emo { display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 3px; font-size: 16px; color: #8c8c8c; }
.aw-w2g .aw-chat-emo:hover, .aw-w2g .aw-chat-emo.on { background: #f3f3f3; color: #367dc3; text-decoration: none; }
.aw-chat-emo[aria-disabled="true"] { opacity: .4; pointer-events: none; }
.aw-chat-count { margin-left: auto; font-size: .8rem; font-variant-numeric: tabular-nums; color: #8c8c8c; }
.aw-chat-pop { position: absolute; left: 6px; right: 6px; bottom: calc(100% - 4px); z-index: 10; display: none; padding: 8px; border: 1px solid rgba(0, 0, 0, .15); border-radius: 3px; background: #fff; box-shadow: 0 6px 12px rgba(0, 0, 0, .175); }
.aw-chat-pop.on { display: block; }
.aw-chat-react { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; }
.aw-chat-react > span { flex: 0 0 100%; margin: 0 0 2px; font-family: "Nunito Sans", sans-serif; font-size: 11px; font-weight: 700; text-transform: uppercase; color: #8c8c8c; }
.aw-chat-reactbtn { width: 30px; height: 30px; padding: 0; border: 0; border-radius: 3px; background: none; font-size: 19px; line-height: 30px; cursor: pointer; transition: transform .15s, background-color .15s; }
.aw-chat-reactbtn:hover { background: #f3f3f3; transform: scale(1.15); }
.aw-chat-reactbtn:disabled { opacity: .4; cursor: default; transform: none; }
.aw-chat-emojis:empty { display: none; }
.aw-chat-emojis { margin-top: 8px; }
.aw-chat-emojis emoji-picker { width: 100%; height: 240px; --border-size: 0; --border-radius: 3px; --emoji-size: 1.3rem; --num-columns: 7; --indicator-color: #367dc3; }
.aw-chat-emojis emoji-picker.dark { --background: #222; --input-border-color: #2f2f2f; --input-font-color: #c3bfbf; --input-placeholder-color: #888; --button-hover-background: #303030; --button-active-background: #303030; --category-font-color: #888; }
body.dark .aw-w2g-viewcount, body.dark .aw-w2g .aw-chat-empty, body.dark .aw-w2g .room-chat .event, body.dark .aw-chat-count, body.dark .aw-w2g #messages-list .msg-time { color: #6d6d6d; }
body.dark .aw-w2g-viewcount b, body.dark .aw-w2g-count { color: #c3bfbf; }
body.dark .aw-w2g #messages-list .message.self { background: #1d2733; }
body.dark .aw-w2g #messages-list .avatar, body.dark .aw-w2g #messages-list .rank-label { background: #303030; }
body.dark .aw-w2g #messages-list .name { color: #b3b2b2; }
body.dark .aw-w2g #messages-list .owner .name { color: #74b7f9; }
body.dark .aw-w2g #messages-list .text { color: #c3bfbf; }
body.dark .aw-w2g .room-chat .load-more-msg { background: #1d1b1b; color: #888; }
body.dark .aw-w2g .room-chat .load-more-msg:hover { background: #367dc3; color: #ddd; }
body.dark .aw-chat-offline { background: #3a2023; color: #e7a6ad; }
body.dark .aw-chat-composer { border-color: rgba(51, 51, 51, .84); }
body.dark .aw-w2g .aw-chat-emo:hover, body.dark .aw-w2g .aw-chat-emo.on, body.dark .aw-chat-reactbtn:hover { background: #191818; }
body.dark .aw-chat-pop { background: #222; border-color: #333; }

/* 8. Members ----------------------------------------------------------------------------------------------------- */
.aw-w2g .aw-w2g-members-empty { margin: 0; padding: 6px 0; color: #8c8c8c; }
.aw-w2g .aw-w2g-memberlist { max-height: 320px; margin: -4px 0; padding: 0; overflow-y: auto; list-style: none; scrollbar-width: thin; }
.aw-w2g-memberlist li { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid #eee; }
.aw-w2g-memberlist li:last-child { border-bottom: 0; }
.aw-w2g-av { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: #eee; }
.aw-w2g .aw-w2g-mname { overflow: hidden; font-size: 1.05rem; font-weight: 500; color: #555; text-overflow: ellipsis; white-space: nowrap; }
.aw-w2g .aw-w2g-mname:hover, .aw-w2g .is-host .aw-w2g-mname { color: #367dc3; }
.aw-w2g-role { padding: 1px 6px; border-radius: 2px; background: #367dc3; color: #fff; font-size: .75rem; font-weight: 500; }
.aw-w2g .aw-w2g-kick.is-armed { background: #d9534f; border-color: #d9534f; color: #fff; }
body.dark .aw-w2g-memberlist li { border-color: rgba(51, 51, 51, .84); }
body.dark .aw-w2g-av { background: #303030; }
body.dark .aw-w2g .aw-w2g-mname { color: #888; }
body.dark .aw-w2g .aw-w2g-mname:hover, body.dark .aw-w2g .is-host .aw-w2g-mname { color: #ddd; }

/* 9. One column -------------------------------------------------------------------------------------------------- */
/* At animeworld's one-column breakpoint the sidebar drops under the main column; in a room the chat should follow
   the player, so the two columns are dissolved and the widgets ordered: player, servers, chat, members, host
   panel, the anime, other rooms. */
@media screen and (max-width: 800px) {
    #app.w2g-room .aw-w2g-room #body-container { display: flex; flex-direction: column; }
    #app.w2g-room .aw-w2g-room #body-container::before, #app.w2g-room .aw-w2g-room #body-container::after { display: none; }
    #app.w2g-room .aw-w2g-room #main, #app.w2g-room .aw-w2g-room #main > .content, #app.w2g-room .aw-w2g-room #sidebar { display: contents; }
    #app.w2g-room .aw-w2g-room .aw-w2g-player { order: 1; }
    #app.w2g-room .aw-w2g-room .aw-w2g-srv { order: 2; }
    #app.w2g-room .aw-w2g-room .aw-w2g-chatbox { order: 3; height: 440px; }
    #app.w2g-room .aw-w2g-room .aw-w2g-members { order: 4; }
    #app.w2g-room .aw-w2g-room .aw-w2g-host { order: 5; }
    #app.w2g-room .aw-w2g-room .aw-w2g-about { order: 6; }
    #app.w2g-room .aw-w2g-room .aw-w2g-related { order: 7; }
    /* the banner boxes (CMS `content` / `sidebar` slots, the house banner) keep their place in the one column:
       after the anime box and at the end, never above the player */
    #app.w2g-room .aw-w2g-room .ak-ad--content { order: 6; }
    #app.w2g-room .aw-w2g-room .ak-ad--sidebar, #app.w2g-room .aw-w2g-room .aw-banner-widget { order: 8; }
    .aw-w2g-room .widget.player #controls .aw-w2g-chatlnk { display: block; }
}

/* ---- fidelity pass 3: the owner's mascot (`$aw->mascot()`): chibi in the empty lobby, chat in the empty chat ---- */
.aw-w2g-empty .aw-w2g-empty-art { display: block; width: 170px; height: auto; max-width: 50%; margin: 0 auto 12px; }
.aw-w2g .aw-chat-empty .aw-chat-empty-art { display: block; width: 110px; height: auto; margin: 0 auto 10px; }
/* The header banner (partials/w2g/hero): the 16:9 sofa picture right-aligned at the box's height, the text over its
   empty left part; a soft blue gradient in light, the widget greys in dark. */
.aw-w2g-hero { position: relative; display: flex; align-items: center; min-height: 190px; margin: 0 0 12px; padding: 16px 18px; overflow: hidden; border-radius: 3px; background: linear-gradient(100deg, #eef4fb 0%, #e3edf9 55%, #d5e5f7 100%); }
.aw-w2g-hero-art { position: absolute; right: 0; bottom: 0; width: auto; height: 100%; max-width: none; pointer-events: none; user-select: none; }
.aw-w2g-hero-text { position: relative; z-index: 1; max-width: 58%; font-family: "Nunito Sans", sans-serif; }
.aw-w2g-hero-title { display: block; margin: 0 0 6px; font-size: 1.55rem; font-weight: 700; line-height: 1.2; color: #165fa7; text-transform: uppercase; }
.aw-w2g-hero-text p { margin: 0 0 12px; font-size: 1rem; line-height: 1.45; color: #555; }
.aw-w2g-hero--create { min-height: 150px; }
.aw-w2g-hero--create .aw-w2g-hero-text p { margin-bottom: 0; }
.aw-w2g-hero--noart .aw-w2g-hero-text { max-width: none; }
body.dark .aw-w2g-hero { background: linear-gradient(100deg, #1d1d1d 0%, #262626 60%, #2c2f35 100%); }
body.dark .aw-w2g-hero-title { color: #ccc8c8; }
body.dark .aw-w2g-hero-text p { color: #a3a1a1; }
@media (max-width: 600px) {
    .aw-w2g-hero { align-items: flex-start; min-height: 0; padding: 14px 14px 128px; }
    .aw-w2g-hero-art { height: 128px; }
    .aw-w2g-hero-text { max-width: none; }
    .aw-w2g-hero-title { font-size: 1.3rem; }
}

@media (max-width: 480px) { .aw-w2g-room #controls .aw-w2g-vt-info [data-w2g-lang], .aw-w2g-room #controls .aw-w2g-vt-info .aw-w2g-sep { display: none; } .aw-w2g-room .widget.player #controls { gap: 6px; } }
/* The episode scroller inside the one-column room (its ancestors are `display: contents` there): without containment
   Chrome counts the scrolled-out cells into the page's height and leaves a blank band under the footer. */
.aw-w2g-eps { contain: layout paint; }
