@font-face {
  font-family: 'Baloo Tamma 2';
  src: url('../fonts/BalooTamma2.ttf') format('truetype');
  font-weight: 400 800;
  font-display: swap;
}

:root {
  --yellow: #ffd21f;
  --red: #d7262e;
  --maroon: #4a0b12;
  --maroon-2: #2a0509;
  --cream: #fff4da;
  --gold: #f2b84b;
  --ink: #1d0a0c;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: 'Baloo Tamma 2', system-ui, sans-serif;
  background: var(--maroon-2);
  color: var(--cream);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }

/* ---------------- welcome ---------------- */
.welcome {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 16px calc(24px + env(safe-area-inset-bottom));
  background:
    radial-gradient(120% 60% at 50% 0%, #7a1420 0%, transparent 70%),
    radial-gradient(80% 50% at 50% 100%, #5a0e18 0%, transparent 70%),
    var(--maroon-2);
  overflow-x: clip;
  position: relative;
  isolation: isolate;
}
/* Generated backdrop (art-src/landing-bg.png): festoon lights on top, a Mysore Palace, Hampi chariot and Auckland
   skyline along the bottom. Fixed to the screen, so the skyline stays at the bottom while the page scrolls. */
.welcome::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background: url('../assets/landing-bg.webp') center bottom / cover no-repeat;
  pointer-events: none;
}

/* Ilkal saree "tope teni" border */
.tope {
  width: 100vw;
  height: 22px;
  background:
    linear-gradient(var(--yellow), var(--yellow)) top / 100% 4px no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='18'%3E%3Cpath d='M0 0h24L12 14z' fill='%23d7262e'/%3E%3Cpath d='M12 14L0 0v18h24V0z' fill='%23fff4da'/%3E%3Cpath d='M12 9L6 3h12z' fill='%23ffd21f'/%3E%3C/svg%3E") 0 4px / 24px 18px repeat-x;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  font-size: 15px;
  opacity: 0.92;
}
.flag {
  width: 22px; height: 22px; border-radius: 50%;
  background: linear-gradient(var(--yellow) 50%, var(--red) 50%);
  box-shadow: 0 0 0 2px #fff4da;
}
.logo { width: 40px; height: 40px; flex: none; border-radius: 50%; box-shadow: 0 0 0 2px var(--yellow), 0 3px 10px rgba(0, 0, 0, 0.4); }

.hero { text-align: center; margin-top: 10px; }
.hello { margin: 0; font-size: 22px; font-weight: 700; height: 1.6em; position: relative; }
.hello span { display: inline-block; animation: hello 5s ease-in-out infinite; }
.hello-kn { color: var(--yellow); }
.hello-en { color: #ffb3a8; animation-delay: 0.25s; }
@keyframes hello {
  0%, 100% { transform: translateY(0) rotate(0); }
  10% { transform: translateY(-6px) rotate(-4deg); }
  20% { transform: translateY(0) rotate(0); }
}
h1 {
  /* background-clip: text paints only inside the box, and Kannada conjuncts (್ಯ, ತ್ಸ) hang below the line: the
     padding grows the box to hold them, and the negative margin gives the space back */
  margin: 4px 0 -0.25em;
  padding: 0.05em 0 0.25em;
  font-size: clamp(34px, 10.5vw, 56px);
  line-height: 1.15;
  font-weight: 800;
  background: linear-gradient(180deg, #fff6c4 0%, var(--yellow) 45%, #f39a1e 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 3px 0 rgba(0, 0, 0, 0.35));
}
.when { margin: 4px 0 0; font-size: 17px; font-weight: 600; color: #ffe9b8; }

.demo-card {
  margin: 22px 0 0;
  width: min(62vw, 260px);
  background: #fffaf0;
  padding: 10px 10px 0;
  border-radius: 6px;
  transform: rotate(-2.5deg);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.08);
  position: relative;
}
.demo-card::before {
  content: '';
  position: absolute;
  top: -12px; left: 50%;
  width: 96px; height: 24px;
  transform: translateX(-50%) rotate(3deg);
  background: linear-gradient(var(--yellow) 50%, var(--red) 50%);
  opacity: 0.9;
}
.demo-card canvas { display: block; width: 100%; aspect-ratio: 3 / 4; border-radius: 2px; }
.demo-card figcaption {
  color: var(--ink);
  text-align: center;
  font-weight: 700;
  font-size: 17px;
  line-height: 1.3;
  padding: 8px 0 10px;
}
/* Always two lines, one per language, so a long lens name never changes the card's height. */
.demo-card figcaption span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo-card figcaption .en { font-size: 14px; font-weight: 600; opacity: 0.75; }

.modes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: min(100%, 420px);
  margin-top: 26px;
}
.modes button {
  display: grid;
  justify-items: center;
  gap: 0;
  padding: 12px 8px 10px;
  border-radius: 18px;
  border: 2px solid rgba(255, 244, 218, 0.18);
  background: rgba(255, 255, 255, 0.05);
  transition: transform 0.15s, border-color 0.15s, background 0.15s;
}
.modes button[aria-pressed='true'] {
  border-color: var(--yellow);
  background: rgba(255, 210, 31, 0.14);
  transform: translateY(-2px);
}
.mode-icon { font-size: 26px; line-height: 1.2; }
.mode-kn { font-size: 22px; font-weight: 800; color: var(--yellow); line-height: 1.3; }
.mode-en { font-size: 14px; opacity: 0.8; }

.cta {
  margin-top: 18px;
  width: min(100%, 420px);
  display: grid;
  justify-items: center;
  padding: 12px 20px 10px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffe066 0%, var(--yellow) 50%, #f0a81a 100%);
  color: #5a0a10;
  box-shadow: 0 6px 0 #a3121c, 0 14px 30px rgba(0, 0, 0, 0.45);
  transition: transform 0.1s, box-shadow 0.1s;
}
.cta:active { transform: translateY(4px); box-shadow: 0 2px 0 #a3121c, 0 8px 20px rgba(0, 0, 0, 0.45); }
.cta-kn { font-size: 24px; font-weight: 800; line-height: 1.25; }
.cta-en { font-size: 15px; font-weight: 600; opacity: 0.85; }
.cta.small { width: auto; padding: 10px 28px 8px; font-weight: 700; font-size: 18px; }

.privacy { font-size: 14px; opacity: 0.85; margin: 18px 0 0; text-align: center; }
.foot { margin-top: auto; padding-top: 22px; font-size: 14px; opacity: 0.7; display: flex; gap: 8px; }
.foot a { color: var(--yellow); }

/* ---------------- camera ---------------- */
.camera {
  position: fixed;
  inset: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  grid-template-columns: minmax(0, 1fr);
  background: #0d0204;
  padding-top: env(safe-area-inset-top);
}
.topbar {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
}
.icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 44px;
  height: 44px;
  padding: 0 10px;
  border: 0;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.1);
}
.icon-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn[aria-pressed='true'] { background: var(--yellow); color: #4a0b12; }
.btn-label { font-size: 13px; font-weight: 700; line-height: 1; padding-top: 2px; }
#close { margin-right: auto; }
.seg {
  display: flex;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  padding: 3px;
}
.seg button {
  border: 0;
  background: transparent;
  height: 38px;
  padding: 2px 14px 0;
  border-radius: 19px;
  font-weight: 800;
  font-size: 17px;
}
.seg button[aria-pressed='true'] { background: var(--cream); color: #4a0b12; }

.stage {
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 0 8px;
  container-type: size;
}
.viewport {
  position: relative;
  --ar: 3 / 4;
  aspect-ratio: var(--ar);
  width: min(100cqw, calc(100cqh * var(--arw, 0.75)));
  max-height: 100cqh;
  border-radius: 18px;
  overflow: hidden;
  background: #000;
}
body.landscape .viewport { width: min(100cqw, 133cqh); }
.viewport canvas { width: 100%; height: 100%; display: block; }

.cue {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100% - 28px);
  display: grid;
  justify-items: center;
  padding: 8px 16px 6px;
  border: 2px solid var(--yellow);
  border-radius: 16px;
  background: rgba(42, 5, 9, 0.82);
  backdrop-filter: blur(6px);
  text-align: center;
}
.cue.pop { animation: pop 0.35s cubic-bezier(.2, 1.6, .5, 1); }
@keyframes pop { from { transform: translateX(-50%) scale(0.8); opacity: 0; } }
.cue-kn { font-size: 20px; font-weight: 800; color: var(--yellow); line-height: 1.3; }
.cue-en { font-size: 14px; line-height: 1.3; }
.cue-next { font-size: 11px; opacity: 0.6; margin-top: 2px; }

.countdown {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: min(40vw, 220px);
  font-weight: 800;
  color: var(--yellow);
  text-shadow: 0 6px 0 #a3121c, 0 0 40px rgba(0, 0, 0, 0.6);
  pointer-events: none;
}
.countdown.tick { animation: tick 1s ease-out; }
@keyframes tick { from { transform: scale(1.6); opacity: 0; } 20% { transform: scale(1); opacity: 1; } to { opacity: 0.2; } }

.flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.flash.go { animation: flash 0.45s ease-out; }
@keyframes flash { from { opacity: 0.9; } to { opacity: 0; } }

.loading, .cam-error {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  text-align: center;
  padding: 24px;
  background: rgba(20, 3, 6, 0.75);
}
.loading p { margin: 0; font-size: 18px; font-weight: 700; }
.loading small { font-weight: 500; opacity: 0.8; font-size: 14px; }
.spinner {
  width: 46px; height: 46px; border-radius: 50%;
  border: 5px solid rgba(255, 210, 31, 0.25);
  border-top-color: var(--yellow);
  border-right-color: var(--red);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.err-kn { font-size: 34px; font-weight: 800; color: var(--yellow); margin: 0; }
.cam-error p { margin: 0; max-width: 300px; line-height: 1.4; }

.controls {
  padding: 8px 0 calc(14px + env(safe-area-inset-bottom));
  text-align: center;
}
.controls { min-height: 0; }
.lens-name { margin: 0; font-weight: 800; font-size: 18px; color: var(--yellow); line-height: 1.3; }
.lens-tip {
  display: inline-block;
  margin: 4px 0 0;
  padding: 3px 12px 1px;
  border-radius: 999px;
  background: rgba(255, 244, 218, 0.12);
  font-size: 14px;
  font-weight: 600;
}

.carousel { position: relative; margin-top: 8px; height: 92px; }
.lenses {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0 calc(50% - 31px);
  scrollbar-width: none;
}
.lenses::-webkit-scrollbar { display: none; }
.lens {
  flex: 0 0 62px;
  height: 62px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  overflow: hidden;
  scroll-snap-align: center;
  background: #333;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35);
  transition: transform 0.2s;
}
.lens canvas { width: 100%; height: 100%; display: block; }
.lens.on { transform: scale(1.06); }
.shutter {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 88px;
  height: 88px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 6px solid #fff;
  background: transparent;
  box-shadow: 0 0 0 3px rgba(215, 38, 46, 0.9), 0 4px 18px rgba(0, 0, 0, 0.5);
}
.shutter:active { transform: translate(-50%, -50%) scale(0.92); }
.shutter.busy {
  border-color: rgba(255, 255, 255, 0.3);
  border-top-color: var(--yellow);
  animation: spin-c 0.8s linear infinite;
}
@keyframes spin-c { to { transform: translate(-50%, -50%) rotate(360deg); } }

#video { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* ---------------- preview ---------------- */
.preview {
  position: fixed;
  inset: 0;
  z-index: 5;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
  gap: 12px;
  padding: calc(14px + env(safe-area-inset-top)) 16px calc(16px + env(safe-area-inset-bottom));
  background: #0b0405;
  animation: rise 0.3s ease-out;
}
@keyframes rise { from { opacity: 0; transform: translateY(20px); } }
.shot-wrap { position: relative; min-height: 0; display: grid; }
.preview img,
.preview video {
  min-height: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 12px;
}
.processing {
  position: absolute;
  inset: 0;
  display: none;
  place-content: center;
  justify-items: center;
  gap: 10px;
  text-align: center;
}
.processing p {
  margin: 0;
  padding: 8px 16px 6px;
  border-radius: 14px;
  background: rgba(20, 3, 6, 0.75);
  font-weight: 700;
  font-size: 17px;
}
.processing small { display: block; font-weight: 500; font-size: 13px; opacity: 0.85; }
.preview.pending .processing { display: grid; }
.shot-wrap .snap { width: 100%; height: 100%; min-height: 0; object-fit: contain; border-radius: 12px; }
.preview.pending .snap { filter: brightness(0.75); }
.preview.pending .preview-actions button,
.preview.pending .preview-actions a { opacity: 0.45; pointer-events: none; }
.preview-actions { display: grid; justify-items: center; gap: 12px; }
.preview-actions .cta { margin: 0; }
.row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.ghost {
  border: 1.5px solid rgba(255, 244, 218, 0.35);
  background: transparent;
  color: var(--cream);
  text-decoration: none;
  border-radius: 999px;
  padding: 8px 14px 6px;
  font-size: 15px;
  font-weight: 700;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(150px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 10;
  max-width: calc(100vw - 32px);
  padding: 10px 16px 8px;
  border-radius: 14px;
  background: var(--cream);
  color: var(--ink);
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.toast.show { animation: rise 0.25s ease-out; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.emoji { font-size: 20px; line-height: 1; }
.lens-tip.hands { background: rgba(255, 210, 31, 0.18); color: var(--yellow); margin-left: 6px; }
@media (max-width: 420px) {
  .brand > span { max-width: 9.5em; line-height: 1.2; }
  .topbar { gap: 4px; padding: 8px 6px; }
  .icon-btn { padding: 0 8px; min-width: 40px; }
  #cue-toggle .btn-label { display: none; }
  .seg button { padding: 2px 10px 0; }
}

.cta-dock {
  position: sticky;
  bottom: 0;
  z-index: 2;
  width: calc(100% + 32px);
  display: grid;
  justify-items: center;
  padding: 10px 16px calc(14px + env(safe-area-inset-bottom));
  margin-top: 8px;
  background: linear-gradient(rgba(42, 5, 9, 0), rgba(42, 5, 9, 0.92) 30%);
}
.cta-dock .cta { margin-top: 0; }

/* trust card: privacy and offline, kept above the fold */
.trust {
  list-style: none;
  margin: 14px 0 0;
  padding: 10px 14px;
  width: min(100%, 420px);
  display: grid;
  gap: 8px;
  border-radius: 16px;
  background: rgba(255, 244, 218, 0.08);
  border: 1px solid rgba(255, 210, 31, 0.35);
}
.trust li { display: flex; align-items: center; gap: 10px; text-align: left; }
.trust-icon { font-size: 20px; width: 26px; text-align: center; flex: none; }
.trust b { display: block; font-size: 15px; line-height: 1.25; color: #fff6d6; }
.trust small { display: block; font-size: 13px; line-height: 1.3; color: #ffd98a; }

.steps {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 14px;
  font-size: 14px;
  font-weight: 600;
}
.steps li { display: flex; align-items: center; gap: 6px; }
.steps span {
  width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--yellow); color: #5a0a10; font-weight: 800; font-size: 13px;
}

/* caption picker on the preview screen */
.captions { min-width: 0; }
.captions-title { margin: 0 0 6px; font-weight: 700; font-size: 15px; color: var(--yellow); text-align: center; }
.caption-list {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.caption-list::-webkit-scrollbar { display: none; }
.caption {
  flex: 0 0 min(78%, 300px);
  scroll-snap-align: center;
  text-align: left;
  padding: 10px 12px 8px;
  border-radius: 14px;
  border: 1.5px solid rgba(255, 244, 218, 0.25);
  background: rgba(255, 255, 255, 0.05);
  font-size: 14px;
  line-height: 1.4;
}
.caption[aria-checked='true'] { border-color: var(--yellow); background: rgba(255, 210, 31, 0.14); }
.caption .tags { display: block; margin-top: 4px; font-size: 12px; color: #ffd98a; }
.caption-note { margin: 6px 0 0; font-size: 12px; opacity: 0.75; text-align: center; }

/* Install: the header button and the "add to home screen" card (js/install.js). */
.invite-btn { margin-left: auto; }
.invite-btn + .install-btn { margin-left: 6px; }
.install-btn {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 4px;
  min-height: 36px; padding: 4px 12px;
  border: 1.5px solid rgba(255, 244, 218, 0.5); border-radius: 999px;
  background: rgba(255, 244, 218, 0.08); color: inherit;
  font: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
}
.install-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.install {
  position: fixed; left: 0; right: 0; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 80;
  display: flex; align-items: flex-start; gap: 12px;
  width: min(100% - 24px, 460px); margin-inline: auto; padding: 14px 12px 8px 14px;
  background: #fff8e8; color: #3a0810; border-radius: 16px;
  box-shadow: 0 0 0 3px var(--yellow), 0 18px 40px -10px rgba(0, 0, 0, 0.6);
  animation: install-in 0.45s cubic-bezier(.2, .8, .2, 1) both;
}
.install[hidden] { display: none; }
.install:focus { outline: none; }
@keyframes install-in { from { opacity: 0; transform: translateY(24px); } }
.install-logo { flex: none; width: 48px; height: 48px; border-radius: 50%; }
.install-body { flex: 1; min-width: 0; }
.install-title { display: grid; margin: 0; font-size: 1rem; line-height: 1.25; }
.install-kn { color: var(--red); font-size: 1.15rem; font-weight: 800; line-height: 1.35; }
.install-why, .install-steps { margin: 4px 0 0; font-size: 0.9rem; line-height: 1.4; color: #6b3a40; }
.install-steps { padding-left: 1.3em; }
.install-menu { padding-left: 0; }
.install-steps b { color: #3a0810; }
.install-share { display: inline-block; width: 1.3em; height: 1.3em; margin: -0.3em 0 -0.25em; fill: none; stroke: #2a6fdb; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.install-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 4px 8px; margin-top: 6px; }
.install-actions .cta.small { margin: 0 0 6px; min-height: 44px; padding: 6px 24px; align-content: center; font-size: 16px; line-height: 1.2; }
.install-actions .install-no { line-height: 1.2; }
.install-no { min-height: 44px; padding: 6px 14px; border: 0; border-radius: 10px; background: none; color: #6b3a40; font: inherit; font-weight: 600; cursor: pointer; }
.install-no:hover { color: #3a0810; background: rgba(74, 11, 18, 0.08); }
.install [data-kind] { display: none; }
.install[data-kind="steps"] [data-kind="steps"],
.install[data-kind="menu"] [data-kind="menu"] { display: block; }
.install[data-kind="prompt"] [data-kind="prompt"] { display: grid; }

/* Video: hold the shutter to record (js/main.js record()). --p is the 10 s progress, 0 to 1. */
.shutter.recording {
  border-color: rgba(255, 255, 255, 0.35);
  transform: translate(-50%, -50%) scale(1.12);
  transition: transform 0.2s;
}
.shutter.recording::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: conic-gradient(var(--red) calc(var(--p, 0) * 1turn), transparent 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 6px), #000 calc(100% - 6px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 6px), #000 calc(100% - 6px));
}
.shutter.recording::after {
  content: '';
  position: absolute;
  inset: 22px;
  border-radius: 8px;
  background: var(--red);
}
.rec {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px 2px;
  border-radius: 999px;
  background: rgba(20, 3, 6, 0.7);
  font-weight: 700;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}
.rec[hidden] { display: none; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--red); animation: rec-blink 1s steps(2) infinite; }
@keyframes rec-blink { 50% { opacity: 0.2; } }
.hold-hint { margin: 2px 0 0; font-size: 12px; opacity: 0.7; }
.camera.is-recording .hold-hint,
.camera.is-recording .lens-tip { visibility: hidden; }

/* Kannada stickers (js/stickers.js): the button, the tray of bubbles and the bin that shows while dragging. */
#view { touch-action: none; }
.fab {
  position: absolute; right: 10px; bottom: 10px; z-index: 3;
  width: 46px; height: 46px; border-radius: 50%; border: 0;
  background: rgba(20, 3, 6, 0.6); font-size: 22px; line-height: 1;
  box-shadow: 0 0 0 2px rgba(255, 210, 31, 0.8);
}
.fab[aria-expanded="true"] { background: var(--yellow); }
.tray {
  position: absolute; left: 8px; right: 64px; bottom: 8px; z-index: 3;
  display: flex; gap: 8px; overflow-x: auto; padding: 6px; border-radius: 16px;
  background: rgba(20, 3, 6, 0.78); scrollbar-width: none;
}
.tray[hidden] { display: none; }
.tray button {
  flex: none; display: grid; justify-items: center; padding: 6px 12px 4px; border-radius: 14px;
  border: 2px solid rgba(20, 4, 6, 0.85); font: inherit; font-weight: 800; font-size: 17px; white-space: nowrap;
}
.tray small { font-weight: 600; font-size: 10px; opacity: 0.8; }
.bin {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 3;
  width: 56px; height: 56px; display: grid; place-items: center; border-radius: 50%;
  background: rgba(20, 3, 6, 0.7); font-size: 26px; pointer-events: none; transition: transform 0.15s, background 0.15s;
}
.bin[hidden] { display: none; }
.bin.hot { transform: translateX(-50%) scale(1.25); background: var(--red); }
.camera.is-recording .fab,
.camera.is-recording .tray { display: none; }

/* Name ribbon sheet */
.sheet {
  position: absolute; left: 10px; right: 10px; top: 50%; transform: translateY(-50%); z-index: 4;
  display: grid; gap: 10px; padding: 16px; border-radius: 18px;
  background: #fff8e8; color: #3a0810; box-shadow: 0 0 0 3px var(--yellow), 0 18px 40px rgba(0, 0, 0, 0.6);
}
.sheet[hidden] { display: none; }
.sheet label { display: grid; font-size: 14px; }
.sheet label b { font-size: 19px; color: var(--red); }
.sheet input { font: inherit; font-size: 20px; font-weight: 700; padding: 10px 12px; border-radius: 12px; border: 2px solid #d9c49a; background: #fff; color: #3a0810; }
.suggests { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-weight: 700; }
.suggests[hidden] { display: none; }
.suggest { padding: 6px 14px 4px; border-radius: 999px; border: 2px dashed var(--red); background: #fff; color: var(--red); font: inherit; font-weight: 800; font-size: 17px; }
.sheet-tip { margin: 0; font-size: 12.5px; color: #6b3a40; line-height: 1.35; }
.sheet-actions { display: flex; justify-content: flex-end; gap: 8px; }
.sheet-actions .ghost { color: #6b3a40; border-color: #d9c49a; }
.sheet-actions .cta.small { margin: 0; padding: 8px 20px 6px; font-size: 16px; }
.tray .name-chip { background: #fff8e8; color: #3a0810; border-style: dashed; }

/* While a portrait clip records, dim the side strips that the 9:16 cut leaves out (main.js recCut). */
.viewport::before, .viewport::after {
  content: ''; position: absolute; top: 0; bottom: 0; width: var(--cut, 0%); z-index: 2;
  background: rgba(0, 0, 0, 0.55); pointer-events: none; opacity: 0; transition: opacity 0.2s;
}
.viewport::before { left: 0; }
.viewport::after { right: 0; }
.camera.is-recording .viewport::before, .camera.is-recording .viewport::after { opacity: 1; }

/* Language: ಕನ್ನಡ + English or ಕನ್ನಡ only (js/lang.js) */
.lang-seg { display: inline-flex; margin-top: 10px; background: rgba(255, 255, 255, 0.1); border-radius: 18px; padding: 3px; }
.lang-seg button {
  border: 0; background: transparent; color: #fff4da; height: 30px; padding: 2px 12px 0; border-radius: 15px;
  font: inherit; font-size: 14px; font-weight: 700;
}
.lang-seg button[aria-pressed='true'] { background: var(--yellow); color: #4a0b12; }
.steps i { font-style: normal; }
html.kn-only .en { display: none !important; }

/* The shutter takes horizontal slides itself (main.js: slide to change lens). */
.shutter { touch-action: none; }
.shutter.sliding { transform: translate(-50%, -50%) scale(0.92); }
