/* Hron web — the Android app's look (Ui.java): black, white text, glass buttons, one violet accent. */
@font-face { font-family: Snowstorm; src: url(fonts/snowstorm-light.otf) format('opentype'); font-display: swap; }
/* Roboto as on Android (variable: weight 100–900, width 75–100%; SIL OFL 1.1, the license is in the file's metadata):
   the app's text is Roboto Condensed = width 75%, the match percent Roboto Thin = weight 100 */
@font-face { font-family: Roboto; src: url(fonts/roboto.ttf) format('truetype-variations'), url(fonts/roboto.ttf) format('truetype');
  font-weight: 100 900; font-stretch: 75% 100%; font-display: swap; }
:root {
  --fill: #8B00FF; --ring: #A640FF; --accent: #BB8CFF;
  --text: #fff; --text2: rgba(255,255,255,.6); --text3: rgba(255,255,255,.4);
  --glass: rgba(255,255,255,.07); --edge: rgba(255,255,255,.12); --hair: rgba(255,255,255,.08);
  --popup: rgba(18,18,21,.97); --danger: #FF6B6B; --disagree: #8C94B8;
  --font: Roboto, "Roboto Condensed", system-ui, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: #000; color: var(--text); font: 16px/1.4 var(--font); font-stretch: 75%; overscroll-behavior: none; }
body.modal { overflow: hidden; }
/* a phone-wide column: on a computer it stays in the middle instead of stretching to the edges */
#app { position: fixed; top: 0; bottom: 0; left: 0; right: 0; margin: 0 auto; max-width: 480px; z-index: 1;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
@media (min-width: 520px) { #app { border-left: 1px solid #141418; border-right: 1px solid #141418; } }
#dust { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
button { font: inherit; color: inherit; }
input, textarea { font: inherit; }
a { color: var(--accent); }
hr { border: 0; border-top: 1px solid var(--hair); margin: 0 16px; }

/* screens */
.layer { position: relative; height: 100%; }
.screen, .main { display: flex; flex-direction: column; height: 100%; }
.scroll { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.col { display: flex; flex-direction: column; gap: 12px; padding: 18px; }
.col.center { align-items: stretch; text-align: left; }
.titlebar { position: relative; text-align: center; font-size: 20px; padding: 16px 70px; min-height: 56px; }
.titlebar.brand { font-family: Snowstorm, var(--font); font-size: 30px; padding: 10px; letter-spacing: 1px; }
.tb-left { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--accent); font-size: 17px; }
.logo { font-family: Snowstorm, var(--font); font-size: 58px; letter-spacing: 4px; text-align: center; margin: 24px 0 8px; }
.big-title { font-size: 24px; text-align: center; margin-top: 8px; }
.body { margin: 0; color: var(--text); font-size: 16px; white-space: pre-line; }
.body.big { font-size: 17px; }
.body.dim, .dim { color: var(--text2); }
.center { text-align: center; }
.note { margin: 0; color: var(--text2); font-size: 14px; white-space: pre-line; }
.tiny { color: var(--text3); font-size: 11px; margin: 4px 16px; }
.section { color: var(--text3); font-size: 13px; font-weight: 700; letter-spacing: .08em; margin: 18px 0 2px; }
.pad { padding: 4px 16px 10px; display: flex; flex-direction: column; gap: 10px; }

/* buttons */
.btn { min-height: 48px; padding: 8px 16px; border-radius: 24px; border: 1px solid var(--edge); background: var(--glass); color: #fff; font-size: 16px; cursor: pointer; }
.btn.primary { background: var(--fill); border: 2.5px solid var(--ring); }
.btn.danger { color: var(--danger); }
.blabel { display: inline-flex; align-items: center; gap: 8px; }
.bicon { flex: none; }
.btn:disabled, .bottom:disabled { opacity: .4; }
.btn:active, .bottom:active, .row:active { filter: brightness(1.3); }
.bottom { border: 0; background: transparent; color: #fff; font-size: 18px; padding: 18px; margin-bottom: 4px; }
/* pressed (and while its request runs): a soft glow rising from the bottom, as in the Android app */
.bottom:active:not(:disabled), .bottom.busy { background: linear-gradient(to top, rgba(255,255,255,.18), rgba(255,255,255,.08) 50%, transparent); filter: none; }
.row { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 14px 16px; font-size: 19px; color: #fff; }
.row.dangertext { color: var(--danger); }
.link, .doclink { background: none; border: 0; color: var(--accent); text-align: left; padding: 4px 0; font-size: 15px; }
.doclink { color: var(--text); font-size: 13px; padding: 6px 16px; }
.link.pad { padding: 14px 16px 0; font-size: 13px; }
.pair { display: flex; gap: 8px; }
.pair > * { flex: 1; }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 6px 0; font-size: 16px; }
.check input { width: 22px; height: 22px; accent-color: var(--fill); flex: none; margin-top: 1px; }
.input { width: 100%; background: var(--glass); border: 1px solid var(--edge); border-radius: 12px; color: #fff; padding: 12px 14px; font-size: 17px; outline: none; }
.input:focus { border-color: var(--ring); }

/* segments */
.segments { display: flex; background: var(--glass); border: 1px solid var(--edge); border-radius: 28px; padding: 4px; gap: 4px; }
.seg { flex: 1; min-height: 46px; border: 0; border-radius: 24px; background: transparent; color: var(--text2); font-size: 16px; }
.seg.on { background: var(--fill); color: #fff; box-shadow: inset 0 0 0 2px var(--ring); }
.segments.locked { opacity: .55; }

/* wheels */
.wheels { display: flex; gap: 8px; }
.wheels > .wheel { flex: 1; }
.wheels.date > .wheel:nth-child(2) { flex: 1.5; }
.wheel { position: relative; height: 120px; }
.wheel-list { height: 120px; overflow-y: auto; scroll-snap-type: y mandatory; scrollbar-width: none; overscroll-behavior: contain; }
.wheel-list::-webkit-scrollbar { display: none; }
.wheel-pad { height: 40px; }
.wheel-item { height: 40px; line-height: 40px; text-align: center; font-size: 24px; scroll-snap-align: center; white-space: nowrap; }
.wheel.locked { opacity: .55; }

/* popups */
.popup-back { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; padding: 24px; z-index: 50; }
.popup { width: 100%; max-width: 360px; max-height: 86vh; display: flex; flex-direction: column; background: var(--popup); border: 1px solid var(--edge); border-radius: 16px; overflow: hidden; }
.popup.wide { max-width: 560px; }
.popup-title { font-size: 19px; text-align: center; padding: 18px 18px 0; }
.popup-body { padding: 14px 18px 18px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.popup-buttons { display: flex; }
.pbtn { flex: 1; min-height: 54px; border: 0; background: rgba(255,255,255,.1); color: #fff; font-size: 16.5px; }
.pbtn + .pbtn { border-left: 1px solid rgba(0,0,0,.2); }
.pbtn.primary { background: var(--fill); }
.doc { white-space: pre-line; font-size: 14px; color: var(--text); user-select: text; }
.trcode { font-size: 40px; font-weight: 200; letter-spacing: .12em; color: var(--accent); text-align: center; margin-top: 4px; }
.codein { text-align: center; font-size: 24px; letter-spacing: .1em; margin-top: 20px; }
.codein::placeholder { font-size: 16px; letter-spacing: 0; }
.citylist { display: flex; flex-direction: column; margin-top: 6px; }
.citylist .row { font-size: 16px; padding: 12px 4px; border-bottom: 1px solid var(--hair); }
.reqrun { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.reqrow { display: flex; align-items: center; gap: 10px; font-size: 18px; }
.citystatus { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 4px; color: var(--text2); font-size: 13px; }
.spinner { width: 16px; height: 16px; flex: none; border-radius: 50%; border: 2px solid rgba(187,140,255,.25); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* language: globe and its small menu */
.globe { position: absolute; top: calc(env(safe-area-inset-top) + 6px); right: 6px; width: 52px; height: 52px; border: 0; background: none; color: rgba(255,255,255,.8); }
.menu-back { position: fixed; inset: 0; z-index: 40; }
.langmenu { position: fixed; width: 168px; background: var(--popup); border: 1px solid var(--edge); border-radius: 16px; overflow: hidden; }
.lang { display: block; width: 100%; min-height: 54px; border: 0; background: rgba(255,255,255,.1); color: #fff; font-size: 16.5px; }
.lang + .lang { border-top: 1px solid rgba(0,0,0,.2); }
.lang.on { background: var(--fill); }
.icon { display: inline-flex; }

/* hold to confirm */
.hold { position: relative; overflow: hidden; width: 100%; user-select: none; -webkit-user-select: none; touch-action: none; }
.hold-fill { position: absolute; inset: 0; width: 0; background: rgba(255,107,107,.25); }
.hold.holding .hold-fill { width: 100%; transition: width 2s linear; }
.hold-label { position: relative; }

/* main screen */
.tabs-body { flex: 1; position: relative; overflow: hidden; }
.tab { position: absolute; inset: 0; overflow-y: auto; }
.tabbar { display: flex; }
.tabbtn { flex: 1; height: 56px; border: 0; background: none; color: rgba(255,255,255,.35); }
.tabbtn.on { color: #fff; }
.tabbtn.on .icon { transform: scale(1.08); }
.main.editing > :not(.screen) { display: none; }
.main > .screen { position: absolute; inset: 0; background: rgba(0,0,0,.92); z-index: 5; padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); }

/* cards */
.tab.cards { display: flex; flex-direction: column; overflow: hidden; }
.progress { padding: 10px 16px; }
.progress-text { color: var(--text2); font-size: 14px; }
.bar { position: relative; height: 5px; border-radius: 3px; background: rgba(255,255,255,.12); margin-top: 6px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--fill); border-radius: 3px; }
.bar-mark { position: absolute; top: 0; bottom: 0; width: 2px; background: rgba(255,255,255,.4); }
.stage { flex: 1; position: relative; padding: 4px 14px 16px; min-height: 0; }
.card { position: absolute; inset: 4px 14px 16px; display: flex; flex-direction: column; background: #0c0c0e; border: 1.5px solid var(--ring); border-radius: 22px; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; }
.media { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; position: relative; }
.media img, .media video { width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.story { padding: 22px; font-size: 19px; line-height: 1.45; overflow-y: auto; max-height: 100%; white-space: pre-line; }
.caption { padding: 12px 20px 18px; font-size: 16px; color: rgba(255,255,255,.9); }
.play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: 8px 22px; }
.media video { pointer-events: auto; }
.vicons { position: absolute; right: 10px; bottom: 10px; display: flex; gap: 8px; }
.vicon { width: 38px; height: 38px; border-radius: 19px; border: 0; background: rgba(0,0,0,.4); color: rgba(255,255,255,.9); display: flex; align-items: center; justify-content: center; padding: 0; }
.retry { background: none; border: 0; color: var(--text2); padding: 24px; }
.stamp { position: absolute; top: 22px; padding: 4px 12px; border: 2px solid; border-radius: 8px; font-size: 22px; font-weight: 700; z-index: 2; background: rgba(0,0,0,.6); opacity: 0; pointer-events: none; }
.stamp.yes { left: 18px; color: var(--accent); border-color: var(--accent); transform: rotate(-12deg); }
.stamp.no { right: 18px; color: var(--disagree); border-color: var(--disagree); transform: rotate(12deg); }
.hint { display: flex; justify-content: space-between; padding: 0 20px; color: var(--text2); font-size: 14px; }
.cardbtns { display: flex; gap: 8px; padding: 8px 14px 12px; }
.cardbtns > :first-child { flex: 1; }
.cardbtns > :last-child { flex: 2; }
.done { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; gap: 12px; padding: 24px; }

/* profile */
.profile { padding: 0 0 24px; gap: 0; }
.profile > .section { padding: 0 16px; margin-top: 22px; }
.profile > .pad > .segments { margin-top: 12px; }
.matchblock { margin: 8px 14px 4px; padding: 16px 18px; border: 1.5px solid var(--ring); border-radius: 20px; min-height: 45vh; display: flex; flex-direction: column; gap: 12px; }
.cap { color: var(--text3); font-size: 12px; font-weight: 700; letter-spacing: .08em; }
.match-none { flex: 1; display: flex; flex-direction: column; justify-content: center; text-align: center; gap: 8px; }
.match-head { display: flex; align-items: center; gap: 12px; }
.percent { font-size: 54px; font-weight: 100; font-stretch: 100%; color: var(--accent); }
.percent-label { flex: 1; color: var(--text2); font-size: 13px; font-weight: 700; }
.photoslot { width: 76px; min-height: 30px; }
.slot-text { font-size: 12px; color: var(--text2); text-align: right; }
img.partner { width: 76px; height: 76px; object-fit: cover; border-radius: 14px; border: 1px solid var(--ring); }
.bubble { padding: 12px 14px; border-radius: 12px; background: rgba(255,255,255,.08); white-space: pre-line; }
.bubble.mine { background: rgba(139,0,255,.3); }
.bubble.empty { color: var(--text3); }
.ended { font-size: 20px; }
.myphoto { width: 150px; border-radius: 14px; }
.confirmphoto { width: 200px; border-radius: 14px; align-self: center; }
.preview { width: 165px; height: auto; border-radius: 14px; background: rgba(255,255,255,.08); }  /* the shot's own 3:4 */
.idtext { font-size: 24px; letter-spacing: .04em; padding: 4px 0; }
.idtext.masked { color: var(--text3); }
.status { margin: 6px 16px; font-size: 12px; color: var(--text2); }
.dot.ok { color: #3DDC84; } .dot.down { color: #FF5A5A; } .dot.unknown { color: #777; }
.place { margin: 0; font-size: 18px; }
.form .segments { margin-bottom: 4px; }
.breakdown { display: flex; flex-direction: column; }
.bd-row { padding: 10px 0; border-bottom: 1px solid var(--hair); }
.bd-kind { color: var(--text2); font-size: 11px; font-weight: 700; }
.bd-title { font-size: 17px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.bd-ans { font-size: 14px; padding-top: 4px; }
.bd-ans.same { color: var(--accent); } .bd-ans.differ { color: var(--disagree); }
.bd-head { font-size: 19px; text-align: center; padding: 22px 0 4px; }

/* tour */
.tour { position: fixed; inset: 0; z-index: 60; opacity: 0; transition: opacity .2s; }
.tour.on { opacity: 1; }
.tour-dim { position: absolute; inset: 0; width: 100%; height: 100%; }
.tour-dim path { fill: rgba(0,0,0,.85); }
.tour-ring { position: absolute; border: 1.5px solid var(--ring); border-radius: 18px; pointer-events: none; transition: all .26s; }
.tour-panel { position: absolute; left: 14px; right: 14px; max-width: 520px; margin: 0 auto; background: var(--popup); border: 1px solid var(--edge); border-radius: 18px; padding: 20px 22px 16px; transition: top .2s, opacity .2s; }
.tour-count { color: var(--text3); font-size: 12px; font-weight: 700; }
.tour-title { font-size: 22px; margin-top: 4px; }
.tour-text { font-size: 16px; color: rgba(255,255,255,.85); margin-top: 10px; line-height: 1.45; }
.tour-btns { display: flex; gap: 8px; margin-top: 18px; }
.tour-btns .pbtn { border-radius: 24px; min-height: 48px; }

/* small things */
.toast { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 80px); transform: translateX(-50%); background: var(--popup); border: 1px solid var(--edge); border-radius: 20px; padding: 10px 18px; opacity: 0; transition: opacity .2s; z-index: 70; pointer-events: none; }
.toast.show { opacity: 1; }
.viewer { position: fixed; inset: 0; background: #000; z-index: 80; display: flex; align-items: center; justify-content: center; }
.viewer img { max-width: 100%; max-height: 100%; }
/* the camera: a live picture and a round shutter; no gallery */
.camera { position: fixed; inset: 0; z-index: 80; background: #000; display: flex; flex-direction: column;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
.camframe { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; padding: 12px 16px 0; }
/* a 3:4 frame; the shot is exactly what it shows (photos.js crops the camera picture the same way) */
.camframe video { aspect-ratio: 3 / 4; width: 100%; max-width: 448px; max-height: 100%; object-fit: cover; border-radius: 14px; background: #111; }
.camframe video.mirror { transform: scaleX(-1); }
.cambar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 18px 24px 22px; max-width: 480px; width: 100%; margin: 0 auto; }
.camcancel { justify-self: start; background: none; border: 0; color: var(--text); font-size: 16px; padding: 10px 4px; }
.shutter { width: 72px; height: 72px; border-radius: 50%; border: 3px solid #fff; background: var(--fill); box-shadow: inset 0 0 0 4px #000; padding: 0; }
.shutter:active { background: var(--ring); }
.shutter:disabled { opacity: .4; }
.camera .flip { justify-self: end; width: 44px; height: 44px; border-radius: 22px; background: var(--glass); }
