/* Free tools */
.wrap-wide { max-width: 1360px; margin: 0 auto; padding: 0 24px; }
.toolcard { display: block; color: inherit; text-decoration: none; transition: transform .15s, border-color .15s; }
.toolcard:hover { transform: translateY(-2px); border-color: var(--red); }
.toolcard .go { display: inline-block; margin-top: 10px; color: var(--red); font-weight: 600; font-size: 14px; }
.toolform { display: flex; gap: 8px; max-width: 720px; margin: 0 auto; padding: 6px; border-radius: 99px; background: var(--panel); border: 1px solid var(--line2); box-shadow: var(--shadow); }
.toolform input { flex: 1; min-width: 0; height: 46px; border: 0; background: transparent; color: var(--fg); font: inherit; font-size: 15px; padding: 0 16px; outline: none; }
.toolform .btn { flex: none; height: 46px; border-radius: 99px; padding: 0 22px; }
@media (max-width: 600px) { .toolform { flex-direction: column; border-radius: 20px; } .toolform .btn { width: 100%; } }
.toolres { max-width: 980px; margin: 28px auto 0; }
.toolres .err { text-align: center; color: var(--red); }
.toolres .muted { text-align: center; color: var(--subtle); }
.thgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.thgrid figure { margin: 0; border: 1px solid var(--line2); border-radius: 16px; overflow: hidden; background: var(--bg2); }
.thgrid img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; }
.thgrid figcaption { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; font-size: 14px; }
.trbox { border: 1px solid var(--line2); border-radius: 16px; background: var(--bg2); padding: 18px; white-space: pre-wrap; line-height: 1.6; max-height: 520px; overflow: auto; font-size: 15px; }
.trbtns { display: flex; gap: 8px; justify-content: flex-end; margin-bottom: 10px; flex-wrap: wrap; }
.ochead { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.ochead img { width: 56px; height: 56px; border-radius: 50%; }
.ochead b { font-size: 20px; display: block; }
.ochead span { color: var(--subtle); font-size: 14px; }
.olist { display: flex; flex-direction: column; gap: 10px; }
.orow { display: grid; grid-template-columns: 168px 1fr auto; gap: 14px; align-items: center; padding: 8px; border-radius: 14px; border: 1px solid var(--line2); background: var(--bg2); color: inherit; text-decoration: none; }
.orow img { width: 168px; aspect-ratio: 16/9; object-fit: cover; border-radius: 10px; }
.orow .t { font-weight: 600; line-height: 1.35; }
.orow .m { color: var(--subtle); font-size: 13.5px; margin-top: 4px; }
.obig { font-weight: 700; font-size: 15px; padding: 6px 12px; border-radius: 99px; white-space: nowrap; }
@media (max-width: 600px) { .orow { grid-template-columns: 110px 1fr; } .orow img { width: 110px; } .obig { grid-column: 2; justify-self: start; } }

/* Thumbnail preview tool */
.tp { display: grid; grid-template-columns: 340px 1fr; gap: 24px; align-items: start; }
.tp-side { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 12px; padding: 18px; border-radius: 20px; background: var(--bg2); border: 1px solid var(--line2); }
.tp-variants { display: flex; gap: 6px; flex-wrap: wrap; }
.tp-variants button { height: 34px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line2); background: transparent; color: var(--fg); font: inherit; font-weight: 600; cursor: pointer; }
.tp-variants button.on { background: var(--red); border-color: var(--red); color: #FFFFFF; }
.tp-drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 120px; border: 2px dashed var(--line2); border-radius: 16px; cursor: pointer; text-align: center; padding: 10px; background-size: cover; background-position: center; position: relative; overflow: hidden; }
.tp-drop.has b, .tp-drop.has span { background: rgba(0,0,0,.65); color: #FFFFFF; padding: 2px 8px; border-radius: 6px; }
.tp-drop.drag { border-color: var(--red); }
.tp-drop span { font-size: 13px; color: var(--subtle); }
.tp-l { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--subtle); }
.tp-l em { font-style: normal; float: right; font-weight: 500; }
.tp-l input, .tp-l textarea { font: inherit; font-size: 15px; font-weight: 400; color: var(--fg); background: var(--bg); border: 1px solid var(--line2); border-radius: 10px; padding: 9px 11px; resize: vertical; min-width: 0; }
.tp-av input { padding: 6px; font-size: 12px; }
.tp-row { display: grid; grid-template-columns: 1fr 120px; gap: 8px; }
.tp-row3 { display: grid; grid-template-columns: 1fr 1fr 80px; gap: 8px; }
.tp-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.tp-chips button { height: 34px; padding: 0 14px; border-radius: 99px; border: 0; background: var(--line); color: var(--fg); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; }
.tp-chips button.on { background: var(--fg); color: var(--bg); }
.tp-btns { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.tp-check { font-size: 14px; display: flex; align-items: center; gap: 6px; }
.tp-note { font-size: 12.5px; color: var(--subtle); margin: 0; }
@media (max-width: 980px) { .tp { grid-template-columns: 1fr; } .tp-side { position: static; } }

/* The YouTube-style stage */
.yt { --yb: #0F0F0F; --yf: #F1F1F1; --ym: #AAAAAA; --ychip: #272727; --ychipon: #F1F1F1; --ychiponf: #0F0F0F; --yline: #3F3F3F;
  font-family: Roboto, Arial, sans-serif; background: var(--yb); color: var(--yf); border-radius: 18px; overflow: hidden; border: 1px solid var(--line2); }
.yt.light { --yb: #FFFFFF; --yf: #0F0F0F; --ym: #606060; --ychip: #F2F2F2; --ychipon: #0F0F0F; --ychiponf: #FFFFFF; --yline: #E5E5E5; }
.yt-top { display: flex; align-items: center; gap: 16px; padding: 12px 20px; }
.yt-burger { width: 22px; height: 14px; border-top: 2px solid var(--yf); border-bottom: 2px solid var(--yf); position: relative; flex: none; }
.yt-burger::after { content: ''; position: absolute; left: 0; right: 0; top: 4px; border-top: 2px solid var(--yf); }
.yt-search { flex: 1; max-width: 560px; margin: 0 auto; height: 38px; border: 1px solid var(--yline); border-radius: 99px; display: flex; align-items: center; padding: 0 16px; color: var(--ym); font-size: 15px; }
.yt-me { width: 32px; height: 32px; border-radius: 50%; background: #7E57C2; flex: none; }
.yt-chips { display: flex; gap: 12px; padding: 4px 20px 16px; overflow: hidden; }
.yt-chips span { background: var(--ychip); padding: 7px 12px; border-radius: 8px; font-size: 14px; font-weight: 500; white-space: nowrap; }
.yt-chips span.on { background: var(--ychipon); color: var(--ychiponf); }
.yt-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px 16px; padding: 0 20px 28px; }
@media (max-width: 1200px) { .yt-grid { grid-template-columns: repeat(2, 1fr); } }
.yv { min-width: 0; }
.yv .th { position: relative; aspect-ratio: 16/9; border-radius: 12px; overflow: hidden; background: var(--ychip); }
.yv .th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.yv .du { position: absolute; right: 6px; bottom: 6px; background: rgba(0,0,0,.8); color: #FFFFFF; font-size: 12px; font-weight: 500; padding: 1px 4px; border-radius: 4px; }
.yv .mr { display: flex; gap: 12px; margin-top: 12px; }
.yv .av { width: 36px; height: 36px; border-radius: 50%; background: var(--ychip); flex: none; overflow: hidden; }
.yv .av img { width: 100%; height: 100%; object-fit: cover; }
.yv .ti { font-size: 16px; font-weight: 500; line-height: 22px; max-height: 44px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.yv .me { color: var(--ym); font-size: 14px; line-height: 20px; margin-top: 4px; }
.yv.mine .th { outline: 3px solid #FF0033; outline-offset: 3px; }
/* search */
.yt-list { display: flex; flex-direction: column; gap: 16px; padding: 4px 20px 28px; max-width: 1100px; }
.ys { display: grid; grid-template-columns: minmax(240px, 42%) 1fr; gap: 16px; }
.ys .th { border-radius: 12px; }
.ys .ti { font-size: 18px; line-height: 26px; font-weight: 400; max-height: 52px; }
.ys .me { font-size: 12px; margin-top: 2px; }
.ys .ch { display: flex; align-items: center; gap: 8px; color: var(--ym); font-size: 12px; margin: 12px 0; }
.ys .ch .av { width: 24px; height: 24px; }
.ys .de { color: var(--ym); font-size: 12px; line-height: 18px; }
/* sidebar */
.yt-watch { display: grid; grid-template-columns: 1fr 402px; gap: 24px; padding: 0 20px 28px; }
.yt-player { aspect-ratio: 16/9; border-radius: 12px; background: #000; display: flex; align-items: center; justify-content: center; color: #555; font-size: 14px; }
.yt-ptitle { height: 18px; width: 70%; background: var(--ychip); border-radius: 6px; margin: 14px 0 8px; }
.yt-ptitle.s { width: 40%; }
.yt-side { display: flex; flex-direction: column; gap: 8px; }
.yr { display: grid; grid-template-columns: 168px 1fr; gap: 8px; }
.yr .th { border-radius: 8px; }
.yr .ti { font-size: 14px; line-height: 20px; max-height: 40px; }
.yr .me { font-size: 12px; line-height: 18px; margin-top: 4px; }
@media (max-width: 1100px) { .yt-watch { grid-template-columns: 1fr; } }
/* phone */
.yt-phonewrap { display: flex; justify-content: center; padding: 20px; background: var(--bg2); border-radius: 18px; border: 1px solid var(--line2); }
.yt.phone { width: 390px; max-width: 100%; border-radius: 36px; border: 10px solid #222; height: 780px; overflow-y: auto; }
.yt.phone .yt-top { padding: 10px 14px; }
.yt.phone .yt-chips { padding: 0 14px 10px; }
.yt.phone .yt-grid { grid-template-columns: 1fr; gap: 18px; padding: 0 0 20px; }
.yt.phone .yv .th { border-radius: 0; }
.yt.phone .yv .mr { padding: 0 12px; margin-top: 10px; }
.yt.phone .yv .ti { font-size: 14.5px; line-height: 20px; }
.yt.phone .yv .me { font-size: 12px; margin-top: 2px; }

.tp-l { min-width: 0; }
.tp-l input, .tp-l textarea { width: 100%; box-sizing: border-box; }
.tp-lh { display: flex; justify-content: space-between; }
.tp-file { display: flex; align-items: center; justify-content: center; height: 40px; border: 1px solid var(--line2); border-radius: 10px; background: var(--bg); color: var(--fg); font-weight: 500; font-size: 14px; cursor: pointer; }
.tp-file.has { border-color: var(--red); }
.crumbs { display: flex; gap: 8px; align-items: center; font-size: 13.5px; color: var(--subtle); padding-top: 20px; flex-wrap: wrap; }
.crumbs a { color: var(--subtle); }
.crumbs a:hover { color: var(--fg); }
.crumbs b { color: var(--fg); font-weight: 500; }
.seo { max-width: 820px; }
.seo h2 { font-size: 26px; margin: 36px 0 10px; letter-spacing: -0.02em; }
.seo p, .seo li { font-size: 16.5px; line-height: 1.65; color: var(--muted); }
.seo .howto { padding-left: 22px; }
.seo .howto li { margin-bottom: 6px; }
.seo .faq { text-align: left; }
.seo .faq { margin-left: 0; max-width: none; }

/* preview: big stage with its own toolbar, real full screen */
.wrap-wide { max-width: none; padding: 0 28px; }
.tp { grid-template-columns: 320px minmax(0, 1fr); }
.tp-wrap { min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.tp-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border-radius: 16px; background: var(--bg2); border: 1px solid var(--line2); }
.tp-bar .grow { flex: 1; }
.tp-variants.sm button { height: 34px; min-width: 34px; padding: 0 10px; }
.tp-ic { height: 34px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line2); background: transparent; color: var(--fg); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.tp-ic.red { background: var(--red); border-color: var(--red); color: #FFFFFF; }
.tp-wrap:fullscreen, .tp-wrap.fake-full { position: fixed; inset: 0; z-index: 100; background: var(--bg); padding: 14px; overflow: auto; }
.tp-wrap:fullscreen .yt, .tp-wrap.fake-full .yt { border-radius: 14px; min-height: calc(100vh - 90px); }
.tp-wrap:fullscreen .yt-grid, .tp-wrap.fake-full .yt-grid { grid-template-columns: repeat(4, 1fr); }
.tp-wrap:fullscreen .yt.phone, .tp-wrap.fake-full .yt.phone { min-height: 0; height: calc(100vh - 140px); }
@media (min-width: 1700px) { .yt-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 980px) { .tp { grid-template-columns: 1fr; } .wrap-wide { padding: 0 14px; } }

.otabs { display: inline-flex; gap: 2px; padding: 3px; border-radius: 99px; background: var(--bg2); border: 1px solid var(--line2); margin: 4px 0 14px; }
.otabs button { border: 0; background: transparent; color: var(--subtle); height: 36px; padding: 0 16px; border-radius: 99px; font: inherit; font-weight: 600; cursor: pointer; }
.otabs button.on { background: var(--red); color: #FFFFFF; }
.orow.isshort { grid-template-columns: 72px 1fr auto; }
.orow.isshort img { width: 72px; aspect-ratio: 9/16; }
@media (max-width: 600px) { .orow.isshort { grid-template-columns: 64px 1fr; } .orow.isshort img { width: 64px; } }

/* Phone stability */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { overflow-x: clip; }
@media (max-width: 720px) { input, select, textarea { font-size: 16px !important; } }
