/* Hindi renders as boxes without a Devanagari font, which most machines outside
   India do not have. Self-hosted and subset; unicode-range means only a browser
   with Devanagari to draw ever downloads it. See fonts/README.md. */
@font-face {
  font-family: "Noto Sans Devanagari";
  src: url("/static/fonts/NotoSansDevanagari-subset.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0900-097F, U+A8E0-A8FF, U+1CD0-1CFF;
}

/* MUtube — YouTube circa 2019, in MUNI blue. Light only, no build step. */
:root {
  --blue: #0000DC;          /* MUNI brand; stands in for YouTube's red */
  --live: #cc0000;          /* live, and nothing else */
  --ink: #030303;
  --muted: #606060;
  --line: #e5e5e5;
  --hover: #f2f2f2;
  --bg: #f9f9f9;
  --masthead: 56px;
  --guide: 240px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: #fff; color: var(--ink);
  font: 400 14px/1.4 Roboto, "Noto Sans Devanagari", Arial, "Helvetica Neue", sans-serif; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; font-weight: 500; }
svg { fill: currentColor; }
button { font: inherit; }

/* masthead ---------------------------------------------------------------- */
/* YouTube 2019: 56px bar, hamburger and wordmark hard left, the search box
   centred in the remaining space, icons and the account hard right. */
.masthead { position: fixed; inset: 0 0 auto 0; height: var(--masthead); z-index: 20;
  display: flex; align-items: center; gap: 8px; padding: 0 16px;
  background: #fff; border-bottom: 1px solid var(--line); }
.masthead .brand { margin-right: 16px; }
.masthead .searchbox { margin-left: auto; margin-right: auto; }
.masthead .search-open, .masthead .lang-btn { margin-left: 0; }
.masthead .account { margin-left: 8px; }
.icon-btn { width: 40px; height: 40px; border: 0; border-radius: 50%; background: none;
  color: var(--ink); cursor: pointer; display: grid; place-items: center; flex: none; }
.icon-btn:hover { background: var(--hover); }
.brand img { display: block; height: 20px; width: auto; }
.searchbox { flex: 1; min-width: 0; max-width: 640px; margin: 0 auto; display: flex; height: 32px; }
.searchbox input { flex: 1; min-width: 0; height: 32px; padding: 0 8px 0 12px; font: inherit;
  border: 1px solid #ccc; border-right: 0; border-radius: 2px 0 0 2px; background: #fff;
  box-shadow: inset 0 1px 2px rgba(0,0,0,.08); }
.searchbox input:focus { outline: none; border-color: #1c62b9; }
.searchbox button { width: 64px; border: 1px solid #d3d3d3; border-radius: 0 2px 2px 0;
  background: #f8f8f8; color: #555; cursor: pointer; }
.searchbox button:hover { background: #f0f0f0; }

/* guide ------------------------------------------------------------------- */
.guide { position: fixed; top: var(--masthead); bottom: 0; left: 0; width: var(--guide);
  overflow-y: auto; padding: 12px 0; background: #fff; z-index: 10; }
body.guide-off .guide { display: none; }
.guide-item { display: flex; align-items: center; gap: 24px; height: 40px; padding: 0 24px;
  color: var(--ink); }
.guide-item:hover { background: var(--hover); }
.guide-item.active { background: var(--hover); font-weight: 500; }
.guide-item.active svg { color: var(--live); }
.guide-item span { font-size: 14px; }
.guide-sep { height: 1px; margin: 12px 0; background: var(--line); }
.guide-title { padding: 8px 24px; font-size: 14px; color: var(--muted); text-transform: uppercase; }
.guide-sub { display: flex; align-items: center; gap: 24px; height: 40px; padding: 0 24px; }
.guide-sub:hover { background: var(--hover); }
.guide-sub .avatar { width: 24px; height: 24px; font-size: 10px; }
.guide-sub .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.guide-empty { padding: 0 24px; color: var(--muted); }
/* language picker: the same row as a guide item, in the language itself */

main { margin: var(--masthead) 0 0 var(--guide); padding: 24px 24px 48px; background: var(--bg);
  min-height: calc(100vh - var(--masthead)); }
body.guide-off main { margin-left: 0; }


/* cards ------------------------------------------------------------------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(246px, 1fr)); gap: 40px 16px; }
@media (min-width: 1500px) { .grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); } }
.thumb { position: relative; aspect-ratio: 16/9; background: #000; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.badge { position: absolute; right: 4px; bottom: 4px; padding: 1px 4px; border-radius: 2px;
  background: rgba(0,0,0,.8); color: #fff; font-size: 12px; font-weight: 500; }
.badge.live { background: var(--live); }
.card-meta { display: flex; gap: 12px; padding-top: 12px; }
.avatar { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid;
  place-items: center; color: #fff; font-size: 13px; font-weight: 500; letter-spacing: .02em; }
.card-title { font-size: 14px; font-weight: 500; line-height: 1.3; max-height: 2.6em; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.byline, .sub { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.byline:hover { color: var(--ink); }
.row-card { display: grid; grid-template-columns: 168px 1fr; gap: 8px; margin-bottom: 8px; }
.row-text .card-title { font-size: 14px; }

/* watch ------------------------------------------------------------------- */
.watch { display: grid; grid-template-columns: minmax(0,1fr) 402px; gap: 24px; max-width: 1280px; }
@media (max-width: 1100px) { .watch { grid-template-columns: 1fr; } }
.player { background: #000; }
.player video { width: 100%; aspect-ratio: 16/9; display: block; }
.watch h1 { font-size: 18px; font-weight: 400; margin: 16px 0 0; }
.watch-meta { display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0 12px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.watch-actions { display: flex; gap: 8px; align-items: center; }
.channel-row { display: flex; align-items: center; gap: 16px; padding: 16px 0;
  border-bottom: 1px solid var(--line); }
.channel-row .avatar { width: 48px; height: 48px; font-size: 16px; }
.channel-row .nm { font-size: 15px; font-weight: 500; }
.channel-row .cnt { color: var(--muted); font-size: 13px; }
.spacer { flex: 1; }
.up-next { margin: 0 0 12px; font-size: 16px; font-weight: 500; }

/* buttons ----------------------------------------------------------------- */
.btn { height: 36px; padding: 0 16px; border: 0; border-radius: 2px; background: var(--blue);
  color: #fff; font-size: 14px; font-weight: 500; text-transform: uppercase; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px; }
.btn:hover { filter: brightness(1.15); }
.btn.on { background: #f1f1f1; color: var(--muted); }
.btn.ghost { background: none; color: var(--muted); text-transform: none; font-weight: 400; padding: 0 8px; }
.btn.ghost:hover { background: var(--hover); filter: none; }
.btn.tolive { background: var(--live); }
.btn.tolive.at-edge { background: #f1f1f1; color: var(--muted); }

/* channel ----------------------------------------------------------------- */
.channel-head { display: flex; align-items: center; gap: 24px; padding: 24px;
  background: #fff; border: 1px solid var(--line); margin-bottom: 24px; }
.channel-head .avatar { width: 80px; height: 80px; font-size: 28px; }
.channel-head h1 { font-size: 24px; font-weight: 400; }
.channel-head .cnt { color: var(--muted); }
.section-title { margin: 0 0 16px; font-size: 16px; font-weight: 500; }
.section + .section { margin-top: 32px; }

/* schedule ---------------------------------------------------------------- */
.day { margin-bottom: 24px; }
.day h2 { font-size: 14px; font-weight: 500; color: var(--muted); padding: 8px 0;
  border-bottom: 1px solid var(--line); }
.slot { display: grid; grid-template-columns: 104px 40px 104px 1fr 72px; gap: 12px;
  align-items: center; padding: 8px 16px; border-bottom: 1px solid var(--line); background: #fff; }
.slot .pill { text-align: right; }
a.slot:hover { background: var(--hover); }
.slot .t, .slot .rm { color: var(--muted); font-size: 13px; }
.slot .avatar { width: 32px; height: 32px; font-size: 11px; }
.slot .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slot .nm b { font-weight: 500; }
.slot.off { opacity: .45; }
.pill { font-size: 12px; font-weight: 500; color: var(--muted); }
.pill.live { color: var(--live); }
.empty { padding: 48px 0; color: var(--muted); }
.skel { background: var(--line); aspect-ratio: 16/9; }

/* player ------------------------------------------------------------------ */
.ytp { position: relative; background: #000; aspect-ratio: 16/9; outline: none;
  display: grid; place-items: center;
  font: 400 13px/1 Roboto, "Noto Sans Devanagari", Arial, sans-serif; color: #fff; }
/* The camera zoom is a transform on the video element, and its arithmetic
   assumes the element's box IS the 1920x1080 frame. The stage is that box: it
   stays 16:9 on any screen and clips the zoom, so nothing outside the camera
   inset leaks in around it. Never object-fit -- that letterboxes the picture
   inside the box and breaks the mapping. */
.ytp-stage { position: relative; aspect-ratio: 16/9; width: 100%; max-width: 100%;
  max-height: 100%; overflow: hidden; }
.ytp video { width: 100%; height: 100%; display: block; }
.ytp-shade { position: absolute; inset: auto 0 0 0; height: 110px; pointer-events: none;
  background: linear-gradient(transparent, rgba(0,0,0,.65)); opacity: 0; transition: opacity .2s; }
.ytp-bar { position: absolute; inset: auto 0 0 0; padding: 0 12px 6px;
  opacity: 0; transition: opacity .2s; }
.ytp:hover .ytp-bar, .ytp:focus-within .ytp-bar, .ytp[data-state="paused"] .ytp-bar,
.ytp:hover .ytp-shade, .ytp[data-state="paused"] .ytp-shade { opacity: 1; }
.ytp-scrubber { position: relative; height: 16px; display: flex; align-items: center; cursor: pointer;
  touch-action: none; }
.ytp-track { position: relative; width: 100%; height: 3px; background: rgba(255,255,255,.3); }
.ytp-scrubber:hover .ytp-track { height: 5px; }
.ytp-buffered, .ytp-played { position: absolute; inset: 0 auto 0 0; }
.ytp-buffered { background: rgba(255,255,255,.45); }
.ytp-played { background: var(--blue); }
.is-live .ytp-played { background: var(--live); }
.ytp-knob { position: absolute; top: 50%; width: 13px; height: 13px; margin: -6.5px 0 0 -6.5px;
  border-radius: 50%; background: var(--blue); transform: scale(0); transition: transform .1s; }
.is-live .ytp-knob { background: var(--live); }
.ytp-scrubber:hover .ytp-knob { transform: scale(1); }
.ytp-tip { position: absolute; bottom: 18px; transform: translateX(-50%); padding: 2px 5px;
  background: rgba(0,0,0,.8); border-radius: 2px; font-size: 12px; opacity: 0; white-space: nowrap; }
.ytp-scrubber:hover .ytp-tip { opacity: 1; }
.ytp-buttons { display: flex; align-items: center; gap: 4px; height: 40px; }
.ytp-btn { width: 36px; height: 36px; padding: 6px; border: 0; background: none; color: #fff;
  cursor: pointer; opacity: .92; }
.ytp-btn:hover { opacity: 1; }
.ytp-btn svg { fill: #fff; }
.ytp-volume { display: flex; align-items: center; }
.ytp-vol-slider { width: 0; opacity: 0; transition: width .15s, opacity .15s; accent-color: #fff; }
.ytp-volume:hover .ytp-vol-slider, .ytp-vol-slider:focus { width: 60px; opacity: 1; margin-right: 6px; }
.ytp-time { padding: 0 8px; font-variant-numeric: tabular-nums; }
.ytp-spacer { flex: 1; }
.ytp-livebtn { display: none; width: auto; padding: 0 10px; gap: 6px; align-items: center;
  font-weight: 500; letter-spacing: .02em; }
.is-live .ytp-livebtn { display: inline-flex; }
.ytp-dot { width: 8px; height: 8px; border-radius: 50%; background: #909090; }
.ytp-livebtn.at-edge .ytp-dot { background: var(--live); }
.ytp-menu-wrap { position: relative; }
.ytp-gear[data-rate]:not([data-rate=""])::after { content: attr(data-rate); position: absolute;
  margin: -6px 0 0 -6px; font-size: 10px; font-weight: 700; color: var(--blue); }
.ytp-menu { position: absolute; right: 0; bottom: 44px; min-width: 128px; padding: 6px 0;
  background: rgba(28,28,28,.95); border-radius: 2px; }
.ytp-menu-head { padding: 6px 16px; color: #aaa; font-size: 12px; }
.ytp-speed { display: block; width: 100%; padding: 8px 16px 8px 32px; border: 0; background: none;
  color: #fff; text-align: left; cursor: pointer; font: inherit; }
.ytp-speed:hover { background: rgba(255,255,255,.12); }
.ytp-speed.on::before { content: "✓"; margin-left: -16px; padding-right: 6px; }
.ytp-spinner { position: absolute; inset: 0; margin: auto; width: 48px; height: 48px;
  border: 3px solid rgba(255,255,255,.25); border-top-color: #fff; border-radius: 50%;
  display: none; animation: spin 1s linear infinite; }
.ytp.busy .ytp-spinner { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }
.ytp.is-fs { aspect-ratio: auto; width: 100vw; height: 100vh; }   /* the zoom already framed it */

/* overview lists ---------------------------------------------------------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.tile { display: flex; align-items: center; gap: 12px; padding: 12px; background: #fff;
  border: 1px solid var(--line); }
.tile:hover { background: var(--hover); }
.tile .avatar { width: 40px; height: 40px; }
.tile .nm { font-weight: 500; }
.tile .cnt { color: var(--muted); font-size: 13px; }
.ytp { overflow: hidden; }
.ytp video { transition: transform .2s ease; }
.ytp-btn.on { color: var(--blue); }
.ytp-btn.on svg { fill: #3ea6ff; }

/* phone -------------------------------------------------------------------
   The guide becomes a drawer, the search collapses to an icon, and the
   schedule stops pretending to be a five-column table. */
.scrim { display: none; position: fixed; inset: var(--masthead) 0 0 0; z-index: 9;
  background: rgba(0,0,0,.5); }
.search-open, .search-close { display: none; }

@media (max-width: 900px) {
  .guide { transform: translateX(-100%); transition: transform .2s ease; display: block;
    box-shadow: 0 0 16px rgba(0,0,0,.25); }
  body.guide-open .guide, body.guide-off.guide-open .guide { transform: none; }
  body.guide-off .guide { display: block; }   /* the desktop toggle must not hide the drawer */
  body.guide-open .scrim { display: block; }
  main, body.guide-off main { margin-left: 0; }
}

@media (max-width: 700px) {
  main { padding: 12px; }
  .masthead { gap: 8px; padding: 0 8px; }
  .searchbox { display: none; }
  .search-open { display: grid; margin-left: auto; }
  .masthead .lang-btn, .masthead .account { margin-left: 0; }
  body.searching .brand, body.searching .search-open { display: none; }
  body.searching .searchbox { display: flex; max-width: none; }
  body.searching .search-close { display: grid; }
  .grid { grid-template-columns: 1fr; gap: 24px 0; }
  .watch { gap: 16px; }
  .channel-head { flex-wrap: wrap; gap: 16px; padding: 16px; }
  .channel-head .avatar { width: 56px; height: 56px; font-size: 20px; }
  .channel-head h1 { font-size: 18px; }
  .profile-head { gap: 16px; padding: 16px; }
  .profile-head .avatar { width: 64px; height: 64px; font-size: 22px; }
  .profile-head h1 { font-size: 20px; }
  .profile-head .spacer { display: none; }
  .profile-head .edit { width: 100%; justify-content: center; }
  .profile-edit { padding: 16px; }
  .profile-edit .sheet-actions { justify-content: stretch; }
  .profile-edit .sheet-actions .btn { flex: 1; justify-content: center; }
  .row-card { grid-template-columns: 140px 1fr; }
  .tiles { grid-template-columns: 1fr; }
  .watch-meta { flex-wrap: wrap; gap: 8px; }

  .slot { grid-template-columns: auto 1fr auto;
    grid-template-areas: "avatar name name" "avatar time pill";
    gap: 2px 10px; padding: 10px 12px; }
  .slot .avatar { grid-area: avatar; align-self: center; }
  .slot .nm { grid-area: name; white-space: normal; }
  .slot .t { grid-area: time; }
  .slot .rm { display: none; }               /* the room moves into the name line */
  .slot .pill { grid-area: pill; }

  .ytp-bar { padding: 0 4px 4px; }
  .ytp-btn { width: 32px; height: 32px; padding: 5px; }
  .ytp-volume { display: none; }
  .ytp-time { padding: 0 4px; font-size: 12px; }
  /* .ytp-btn above squares every button to 32px; the live button holds a
     word, and a translated one is longer than "LIVE" -- let it size to it. */
  .ytp-livebtn { width: auto; flex: none; padding: 0 6px; }
}
@media (max-width: 700px) {
  .slot .t::after { content: " · " attr(data-room); }
}

/* rating ------------------------------------------------------------------ */
.rate { display: inline-flex; gap: 4px; }
.rate .btn { display: inline-flex; align-items: center; gap: 6px; height: 32px;
  color: var(--muted); text-transform: none; font-weight: 500; }
.rate .btn svg { fill: currentColor; }
.rate .btn.on { color: var(--ink); }
.rate .btn .n { font-variant-numeric: tabular-nums; }
.watch-actions { gap: 12px; }

/* fullscreen without the fullscreen API (iOS Safari) ----------------------- */
.ytp.is-fake-fs { position: fixed; inset: 0; z-index: 9999;
  width: 100vw; height: 100vh; height: 100dvh; background: #000; }
body.fs-lock { overflow: hidden; }

/* account ----------------------------------------------------------------- */
.account { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.account .avatar { width: 32px; height: 32px; font-size: 12px; cursor: pointer; }
.account .btn { height: 32px; }
.menu { position: absolute; top: 52px; right: 12px; min-width: 180px; padding: 6px 0;
  background: #fff; border: 1px solid var(--line); box-shadow: 0 2px 10px rgba(0,0,0,.2);
  border-radius: 2px; z-index: 30; }
.menu .who { padding: 10px 16px; border-bottom: 1px solid var(--line); font-weight: 500; }
.menu button { display: block; width: 100%; padding: 10px 16px; border: 0; background: none;
  text-align: left; cursor: pointer; font: inherit; }
.menu button:hover { background: var(--hover); }

.modal { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center;
  background: rgba(0,0,0,.5); padding: 16px; }
.sheet { width: min(360px, 100%); background: #fff; border-radius: 2px; padding: 24px;
  display: grid; gap: 14px; }
.sheet h2 { font-size: 20px; font-weight: 400; }
.sheet label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.sheet input { height: 36px; padding: 0 10px; border: 1px solid #ccc; border-radius: 2px;
  font: inherit; color: var(--ink); }
.sheet input:focus { outline: none; border-color: var(--blue); }
.sheet-actions { display: flex; justify-content: flex-end; gap: 8px; }
.auth-err { margin: 0; padding: 8px 10px; background: #fdecea; color: #b3261e; font-size: 13px; }
.auth-swap { margin: 0; font-size: 13px; color: var(--muted); }
.auth-swap a { color: var(--blue); }

/* comments ---------------------------------------------------------------- */
.comments { margin-top: 24px; }
.comments h2 { font-size: 16px; font-weight: 500; margin-bottom: 16px; }
.comment-form { display: grid; grid-template-columns: 40px 1fr; gap: 16px; margin-bottom: 24px; }
.comment-form textarea { border: 0; border-bottom: 1px solid var(--line); resize: none;
  font: inherit; padding: 6px 0; min-height: 28px; }
.comment-form textarea:focus { outline: none; border-bottom: 2px solid var(--ink); }
.comment-form .row { grid-column: 2; display: flex; justify-content: flex-end; gap: 8px; }
.comment { display: grid; grid-template-columns: 40px 1fr; gap: 16px; margin-bottom: 16px; }
.comment .avatar { width: 40px; height: 40px; }
.comment .head { font-size: 13px; }
.comment .head b { font-weight: 500; }
.comment .head span { color: var(--muted); margin-left: 8px; }
.comment .text { margin: 2px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.comment .del { border: 0; background: none; color: var(--muted); cursor: pointer;
  font: inherit; font-size: 12px; padding: 2px 0; }
.comment .del:hover { color: var(--danger, #c00); }
.signin-note { color: var(--muted); }
.signin-note a { color: var(--blue); }

/* live chat --------------------------------------------------------------- */
.chat { border: 1px solid var(--line); border-radius: 2px; display: flex; flex-direction: column;
  height: min(70vh, 560px); background: #fff; }
.chat h2 { padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 14px; }
.chat-log { flex: 1; overflow-y: auto; padding: 8px 12px; }
.chat-line { display: grid; grid-template-columns: 24px 1fr; gap: 8px; padding: 4px 0;
  font-size: 13px; line-height: 1.3; }
.chat-line .avatar { width: 24px; height: 24px; font-size: 10px; }
.chat-line b { font-weight: 500; color: var(--muted); }
.chat-line .msg { overflow-wrap: anywhere; }
.chat-form { border-top: 1px solid var(--line); padding: 10px 12px; }
.chat-form form { display: flex; gap: 8px; }
.chat-form input { flex: 1; min-width: 0; height: 32px; padding: 0 10px; font: inherit;
  border: 1px solid #ccc; border-radius: 2px; }
.chat-form input:focus { outline: none; border-color: var(--blue); }
.chat-form .signin-note { margin: 0; font-size: 13px; }
.chat-note { margin: 0; padding: 10px 12px; border-top: 1px solid var(--line);
  color: var(--muted); font-size: 12px; }
.chat-line .t { color: var(--muted); font-variant-numeric: tabular-nums; }

/* profile ----------------------------------------------------------------- */
.profile { max-width: 720px; min-width: 0; }
.profile-head { display: flex; align-items: center; gap: 24px; padding: 24px;
  background: #fff; border: 1px solid var(--line); flex-wrap: wrap; }
.profile-id { min-width: 0; }
.profile-head h1 { overflow-wrap: anywhere; }
.profile-head .avatar { width: 96px; height: 96px; font-size: 32px;
  background-size: cover; background-position: center; }
.profile-head h1 { font-size: 24px; font-weight: 400; }
.profile-head .uco { margin: 4px 0 0; color: var(--muted); font-variant-numeric: tabular-nums; }
.profile-desc { margin: 16px 0 0; padding: 0 4px; white-space: pre-wrap;
  overflow-wrap: anywhere; }
.profile-edit { margin: 16px 0 0; padding: 20px; background: #fff;
  border: 1px solid var(--line); display: grid; gap: 12px; min-width: 0; }
/* A grid item defaults to min-width:auto, and a file input has an intrinsic
   width wider than a phone -- together that is what pushed the whole page
   sideways. */
.profile-edit > * { min-width: 0; }
.profile-edit input[type=file] { max-width: 100%; }
.profile-edit textarea { width: 100%; box-sizing: border-box; }
.sheet-actions { flex-wrap: wrap; }
.profile-edit label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.profile-edit textarea { font: inherit; padding: 8px; border: 1px solid #ccc;
  border-radius: 2px; resize: vertical; color: var(--ink); }
.profile-edit textarea:focus { outline: none; border-color: var(--blue); }
.profile-edit .counter, .profile-edit .upload-note { margin: 0; font-size: 12px;
  color: var(--muted); }
.profile-edit .counter.over { color: var(--live); }
.menu a.mine { display: block; padding: 10px 16px; }
.menu a.mine:hover { background: var(--hover); }
.lang-btn { flex: none; }
.lang-menu { right: 12px; min-width: 160px; }
.lang-menu button.on { font-weight: 500; }
.lang-menu button.on::after { content: " ✓"; color: var(--blue); }

/* iOS Safari zooms the whole page when you focus a field whose text is under
   16px, and there is no way back out of that zoom except pinching. The fix is
   16px fields, not `maximum-scale=1` -- disabling pinch zoom would stop the
   auto-zoom by taking zooming away from people who actually need it. The
   controls keep their height; only the text grows. */
/* `font: inherit` on a field inside a 13px label resets its size back down and
   outranks a bare `input` selector, so each one has to say 16px itself. */
input, textarea, select,
.searchbox input, .sheet input, .chat-form input,
.comment-form textarea, .profile-edit textarea { font-size: 16px; }
@media (max-width: 700px) {
  /* and give the right-hand icons the same breathing room as the left */
  .masthead { padding: 0 12px; }
  .masthead .account { margin-left: 4px; }
  .searchbox input { height: 36px; }
  .chat-form input { height: 36px; }
}

/* The account slot keeps its width whatever is in it, so nothing shifts when
   the real answer arrives. */
.account { min-width: 40px; justify-content: flex-end; }
.btn.signin .person { display: none; }
@media (max-width: 700px) {
  /* "Sign in" as text wraps to two lines in a 390px bar; 2019 used an icon. */
  .btn.signin { width: 40px; height: 40px; padding: 0; border-radius: 50%;
    background: none; color: var(--ink); justify-content: center; }
  .btn.signin:hover { background: var(--hover); filter: none; }
  .btn.signin .label { display: none; }
  .btn.signin .person { display: block; fill: currentColor; }
}
