/* The public comment section under a video player (/video-thread.mjs). The owner, 2026-11-24:
   「これも追加で、コメントが書けるようにしてほしい。youtubeと同じuiuxでよろしく」 — YouTube's comment section, in this site's paper, ink and red.
   The section sits on /watch (where watch/style.css is loaded) and on /mypage (account/style.css, which gives button, input, textarea, label, p and h2
   broad shapes), so nothing here leans on a .w-* class or a page variable, and every element is reset under .vt.
   The same file on every site (docs/video-thread-sites.md; copied by scripts/sync-video-thread.mjs, never edited there). Every colour is a
   --vt-* variable whose fallback is genaijuku's own colour; another site themes the section by setting them on .vt in its own sheet
   (genaijuku sets none): --vt-ink, --vt-muted, --vt-status, --vt-placeholder, --vt-line, --vt-field-line, --vt-field, --vt-paper, --vt-hover,
   --vt-shadow, --vt-neutral, --vt-navy, --vt-on-navy, --vt-chip, --vt-on-chip, --vt-link, --vt-accent, --vt-accent-deep, --vt-on-accent,
   --vt-disabled, --vt-disabled-ink, --vt-danger, --vt-danger-deep, --vt-liked, --vt-focus.
   Thin 1px full borders or none (no thick line on one side of a box). */

/* Where the placeholder sits. On the watch page and the member page the player's column is a grid with `order`s (watch/style.css, account/style.css);
   the section goes after every one of them and spans the whole row. The own-videos panel is a plain block. */
[data-thread-video]{min-width:0}
.w-primary>[data-thread-video],.watch-primary>[data-thread-video]{grid-column:1/-1;order:30;min-width:0}
.my-player>[data-thread-video]{margin-top:20px;padding-top:20px;border-top:1px solid var(--vt-line,#dcd7cb)}

.vt{margin:28px 0 0;font:400 14px/1.5 system-ui,-apple-system,"Noto Sans JP",sans-serif;color:var(--vt-ink,#27231e);text-align:start}
.vt *,.vt *::before,.vt *::after{box-sizing:border-box}
.vt [hidden]{display:none!important}
.vt p,.vt h2{margin:0;padding:0;line-height:inherit;font-size:inherit;font-weight:inherit;letter-spacing:normal;color:inherit}
.vt time{position:static;padding:0;border-radius:0;background:none;color:inherit;font:inherit;line-height:inherit}
.vt a{color:inherit}
.vt a.vt-login,.vt-text a,.vt-status a{color:var(--vt-link,#a83c28);text-decoration:underline;text-underline-offset:3px}
.vt a.vt-login{font-weight:650}
.vt-text a{overflow-wrap:anywhere}
.vt-icon{display:block;flex:none;width:20px;height:20px}
.vt-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* The one button shape; each kind below says what it changes. */
.vt button{display:inline-flex;align-items:center;justify-content:center;gap:6px;width:auto;min-width:0;min-height:36px;margin:0;padding:0 12px;border:0;border-radius:99px;background:transparent;color:inherit;font:600 14px/1.4 system-ui,-apple-system,"Noto Sans JP",sans-serif;letter-spacing:normal;text-decoration:none;text-transform:none;cursor:pointer;box-shadow:none}
.vt button:hover:not(:disabled){background:var(--vt-hover,#ebe6d9)}
.vt button:disabled{opacity:.5;cursor:default}
.vt :is(button,a,input,textarea):focus-visible{outline:3px solid var(--vt-focus,#d27546);outline-offset:2px}

.vt-section{padding-bottom:28px} /* on every surface something follows the section (the next videos, the lists), so its last row can always be scrolled clear of the contact chat's round button */
.vt-head-row{display:flex;flex-wrap:wrap;align-items:center;gap:8px 24px;margin-bottom:20px}
.vt .vt-title{font-size:20px;font-weight:750;line-height:1.4}
.vt-wait,.vt-wait-row{font-size:14px;font-weight:500;color:var(--vt-muted,#5f594f)}
.vt-sort{gap:8px;padding:0 12px 0 8px;margin-inline-start:-8px}
.vt-sort .vt-icon{width:20px;height:20px}

/* Round avatars: the first character on the site's navy, the brand mark for the operator, a neutral person when signed out. */
.vt-avatar{display:inline-grid;place-items:center;flex:none;width:40px;height:40px;border-radius:50%;overflow:hidden;background:var(--vt-navy,#1f3a6b);color:var(--vt-on-navy,#fff);font:800 16px/1 system-ui,-apple-system,"Noto Sans JP",sans-serif}
.vt-avatar.is-official{background:none}
.vt-avatar.is-neutral{background:var(--vt-neutral,#d9d3c5);color:var(--vt-muted,#5f594f)}
.vt-avatar.is-small,.vt-avatar.is-reply{width:24px;height:24px;font-size:12px}
.vt-avatar-mark{display:block;width:100%;height:100%}
.vt-avatar-person{width:58%;height:58%}

/* The composer: a one-line field that opens on focus. */
.vt-composer{display:flex;align-items:flex-start;gap:16px}
.vt-composer.is-small{gap:12px;margin-top:4px}
.vt-field{flex:1;min-width:0}
.vt .vt-input{display:block;width:100%;min-height:0;height:auto;max-height:224px;margin:0;padding:6px 0 6px;border:0;border-bottom:1px solid var(--vt-field-line,#b7b1a6);border-radius:0;background:transparent;color:inherit;font:400 14px/1.5 system-ui,-apple-system,"Noto Sans JP",sans-serif;resize:none;overflow-y:auto;overflow-wrap:anywhere}
.vt .vt-input::placeholder{color:var(--vt-placeholder,#746f66);opacity:1}
.vt .vt-input:focus,.vt .vt-input:focus-visible{outline:0;border-bottom:2px solid var(--vt-ink,#27231e);padding-bottom:5px}
.vt-name-wrap{margin:14px 0 0}
.vt .vt-name-label{display:block;margin:0 0 4px;padding:0;color:var(--vt-muted,#5f594f);font-size:12px;font-weight:650;letter-spacing:normal}
.vt .vt-name-input{display:block;width:100%;min-height:40px;margin:0;padding:6px 12px;border:1px solid var(--vt-field-line,#b7b1a6);border-radius:8px;background:var(--vt-field,#fff);color:inherit;font:400 14px/1.5 system-ui,-apple-system,"Noto Sans JP",sans-serif}
.vt .vt-name-input:focus{outline:2px solid var(--vt-navy,#1f3a6b);outline-offset:0;border-color:var(--vt-navy,#1f3a6b)}
.vt .vt-note{margin:4px 0 0;font-size:12px;color:var(--vt-muted,#5f594f)}
.vt .vt-counter{margin:4px 0 0;font-size:12px;color:var(--vt-muted,#5f594f);text-align:end;font-variant-numeric:tabular-nums}
.vt-buttons{display:flex;justify-content:flex-end;gap:8px;margin-top:10px}
.vt .vt-btn{min-height:36px;padding:0 16px}
.vt .vt-btn.is-main{background:var(--vt-accent,#bc3e27);color:var(--vt-on-accent,#fff)}
.vt .vt-btn.is-main:hover:not(:disabled){background:var(--vt-accent-deep,#a92c16)}
.vt .vt-btn.is-main:disabled{background:var(--vt-disabled,#e6e1d4);color:var(--vt-disabled-ink,#8a8478);opacity:1}
.vt .vt-btn.is-danger{background:var(--vt-danger,#a92c16);color:var(--vt-on-accent,#fff)}
.vt .vt-btn.is-danger:hover:not(:disabled){background:var(--vt-danger-deep,#8f2412)}
.vt-login-row{display:flex;align-items:center;gap:16px}
.vt .vt-login-text{font-size:14px}

/* Status lines near a control. */
.vt .vt-status{margin:6px 0 0;font-size:13px;line-height:1.5;color:var(--vt-status,#655c51);overflow-wrap:anywhere}
.vt .vt-status:empty{display:none}

/* The list and one post. */
.vt-list{display:flex;flex-direction:column;gap:20px;margin-top:24px}
.vt-post{display:flex;align-items:flex-start;gap:16px}
.vt-post.is-reply{gap:12px}
.vt-main{flex:1;min-width:0}
.vt-post.is-hidden-post>.vt-avatar,.vt-post.is-hidden-post>.vt-main>.vt-body-wrap{opacity:.55}
.vt-post.is-editing>.vt-main>.vt-body-wrap,.vt-post.is-editing>.vt-main>.vt-actions{display:none}
.vt .vt-pinned{display:flex;align-items:center;gap:6px;margin:0 0 4px;font-size:12px;color:var(--vt-muted,#5f594f)}
.vt-pinned .vt-icon{width:14px;height:14px}
.vt-line{display:flex;flex-wrap:wrap;align-items:center;gap:2px 8px;font-size:13px;line-height:1.5}
.vt-name{font-weight:650;overflow-wrap:anywhere}
.vt-name.is-creator{padding:0 8px;border-radius:99px;background:var(--vt-chip,#5f594f);color:var(--vt-on-chip,#fff)}
.vt-official{display:inline-grid;place-items:center;width:15px;height:15px;border-radius:50%;background:var(--vt-chip,#5f594f);color:var(--vt-on-chip,#fff);font-size:10px;font-weight:800;margin-inline-start:-4px}
.vt-time,.vt-edited{font-size:12px;color:var(--vt-muted,#5f594f)}
.vt-flag{padding:0 8px;border:1px solid var(--vt-line,#dcd7cb);border-radius:99px;font-size:11px;line-height:1.7;color:var(--vt-muted,#5f594f)}
.vt .vt-text{margin:2px 0 0;font-size:14px;line-height:1.55;white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word}
.vt .vt-text.is-clamped{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4;line-clamp:4;overflow:hidden}
.vt .vt-text-button{min-height:36px;margin-block:-6px;padding:0 8px;margin-inline-start:-8px;color:var(--vt-muted,#5f594f);font-size:13px;font-weight:650;border-radius:8px}
.vt .vt-trans-row{margin-top:2px}
.vt-edit-box:empty{display:none}
.vt-edit-box{margin-top:6px}

/* Like and reply. */
.vt-actions{display:flex;flex-wrap:wrap;align-items:center;gap:2px;margin:4px 0 0;margin-inline-start:-10px}
.vt .vt-like{gap:6px;min-width:36px;padding:0 10px;color:var(--vt-ink,#27231e)}
.vt .vt-like .vt-icon{width:18px;height:18px}
.vt .vt-like[aria-pressed=true]{color:var(--vt-liked,#a12f1e)}
.vt .vt-like[aria-pressed=true] .vt-icon{fill:currentColor}
.vt .vt-like-n{min-width:1ch;font-size:13px;font-weight:600;color:var(--vt-muted,#5f594f);font-variant-numeric:tabular-nums}
.vt .vt-reply{margin:0;padding:0 14px;color:var(--vt-ink,#27231e);font-size:13px}
.vt-confirm{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;margin-top:8px}
.vt-confirm-text{font-size:14px}

/* Replies under a comment. */
.vt-replies{margin-top:4px}
.vt .vt-replies-toggle{gap:6px;min-height:36px;margin-inline-start:-4px;padding:0 12px 0 4px;color:var(--vt-navy,#1f3a6b);font-size:14px;font-weight:650}
.vt-chevron{display:inline-flex}
.vt-reply-list{display:flex;flex-direction:column;gap:16px;margin-top:8px}
.vt .vt-more-replies{margin-top:6px;color:var(--vt-navy,#1f3a6b)}
.vt-reply-box{margin-top:8px}
.vt-reply-box:empty{display:none}

/* The ⋮ menu and the sort menu. */
.vt-pop{position:relative;flex:none}
.vt .vt-kebab{width:36px;height:36px;min-height:36px;margin:-6px -8px 0 0;padding:0;border-radius:50%;color:var(--vt-muted,#5f594f)}
.vt-menu{position:absolute;z-index:90;top:calc(100% + 4px);inset-inline-start:0;min-width:176px;max-width:calc(100vw - 16px);padding:8px 0;border:1px solid var(--vt-line,#dcd7cb);border-radius:12px;background:var(--vt-paper,#fffefa);box-shadow:0 12px 32px var(--vt-shadow,rgba(51,39,17,.22))}
.vt-menu.is-end{inset-inline-start:auto;inset-inline-end:0}
.vt-menu.is-up{top:auto;bottom:calc(100% + 4px)}
.vt .vt-menu-item{justify-content:flex-start;gap:8px;width:100%;min-height:40px;padding:0 16px;border-radius:0;font-size:14px;font-weight:500;text-align:start;white-space:nowrap}
.vt .vt-menu-item:focus-visible{outline-offset:-3px}
.vt .vt-menu-item.is-danger{color:var(--vt-danger,#a92c16)}
.vt-check{display:inline-flex;flex:none;width:18px;visibility:hidden}
.vt-check.is-on{visibility:visible}
.vt-check .vt-icon{width:18px;height:18px}

/* The end of the list. */
.vt-foot{display:flex;flex-direction:column;align-items:center;gap:12px;margin-top:16px}
.vt .vt-more-comments{min-height:40px;padding:0 20px;border:1px solid var(--vt-line,#dcd7cb);background:var(--vt-paper,#fffefa);font-size:14px}
.vt .vt-empty{margin:24px 0 8px;color:var(--vt-muted,#5f594f);text-align:center}

@media(max-width:760px){
  .vt{margin-top:20px}
  .vt .vt-title{font-size:18px}
  .vt-avatar{width:32px;height:32px;font-size:14px}
  .vt-avatar.is-small,.vt-avatar.is-reply{width:24px;height:24px;font-size:12px}
  .vt-composer,.vt-post,.vt-login-row{gap:12px}
  .vt-list{gap:18px}
  .vt .vt-input,.vt .vt-name-input{font-size:16px} /* 16px: a phone does not zoom the page when the field is touched */
  .vt-buttons{gap:6px}
}
@media(prefers-reduced-motion:reduce){.vt *{transition:none!important;animation:none!important}}
