/* FindMy360 Preview Room. Light theme for recipients, dark "control room" theme for the owner. */

@font-face { font-family: Manrope; font-weight: 700; font-display: swap; src: url(fonts/manrope-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: Manrope; font-weight: 800; font-display: swap; src: url(fonts/manrope-latin-800-normal.woff2) format('woff2'); }
@font-face { font-family: Figtree; font-weight: 400; font-display: swap; src: url(fonts/figtree-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: Figtree; font-weight: 600; font-display: swap; src: url(fonts/figtree-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'DM Mono'; font-weight: 500; font-display: swap; src: url(fonts/dm-mono-latin-500-normal.woff2) format('woff2'); }

:root {
  --ink: #12142b; --ink-2: #1a1d3a; --ink-3: #252a4f; --line: #323764;
  --bone: #fff8f0; --mist: #a9aed0;
  --orange: #ff6b2c; --pink: #ff4f8b; --blue: #2f6bff; --teal: #12b5a6; --sun: #ffd640;
  --display: Manrope, 'Segoe UI', sans-serif; --body: Figtree, 'Segoe UI', sans-serif; --mono: 'DM Mono', ui-monospace, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 16px/1.55 var(--body); }
h1, h2, h3 { font-family: var(--display); font-weight: 800; letter-spacing: -.02em; line-height: 1.12; margin: 0; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
.mono { font-family: var(--mono); font-size: .86em; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes drift { 50% { transform: translate(6vw, -5vh) scale(1.15); } }
@keyframes pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media print { body { display: none !important; } }        /* a preview cannot be printed to paper or PDF */

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 46px; padding: 0 22px; border: 0; border-radius: 999px;
  background: linear-gradient(100deg, var(--orange), var(--pink)); color: #fff; font: 800 15px var(--display); letter-spacing: .01em; text-decoration: none; cursor: pointer;
  box-shadow: 0 8px 22px -10px var(--pink); transition: transform .2s var(--ease), box-shadow .2s var(--ease), filter .2s; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 14px 28px -12px var(--pink); }
.btn:active { transform: none; }
.btn[disabled] { filter: grayscale(1); opacity: .45; cursor: not-allowed; transform: none; }
.btn.ghost { background: transparent; color: inherit; box-shadow: inset 0 0 0 1.5px currentColor; opacity: .86; }
.btn.ghost:hover { opacity: 1; }
.btn.danger { background: var(--pink); box-shadow: none; }
.btn.sm { min-height: 34px; padding: 0 14px; font-size: 13px; }

/* =====================================================================
   LIGHT: what a recipient sees
   ===================================================================== */
body.light { background: var(--bone); color: var(--ink); min-height: 100vh; }
.wash { position: fixed; inset: 0; overflow: hidden; z-index: -1; }
.wash i { position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%; filter: blur(90px); opacity: .5; animation: drift 22s ease-in-out infinite; }
.wash i:nth-child(1) { background: #ffb38f; top: -22vmax; left: -14vmax; }
.wash i:nth-child(2) { background: #9bbcff; bottom: -26vmax; right: -16vmax; animation-delay: -8s; }
.wash i:nth-child(3) { background: #9fe9df; top: 30%; left: 42%; width: 34vmax; height: 34vmax; opacity: .35; animation-delay: -14s; }

.brand { display: flex; align-items: center; gap: 9px; font: 800 18px var(--display); letter-spacing: -.02em; }
.brand em { font-style: normal; background: linear-gradient(90deg, var(--orange), var(--pink), var(--blue)); -webkit-background-clip: text; background-clip: text; color: transparent; }

.cover { min-height: 100vh; display: grid; place-items: center; align-content: center; gap: 18px; padding: 28px 18px; }
.card { width: min(600px, 100%); background: rgba(255, 255, 255, .86); backdrop-filter: blur(18px); border: 1px solid rgba(18, 20, 43, .1); border-radius: 26px;
  padding: clamp(24px, 5vw, 44px); box-shadow: 0 40px 80px -50px rgba(18, 20, 43, .55); position: relative; overflow: hidden; }
.card::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 6px; background: linear-gradient(90deg, var(--orange), var(--pink), var(--blue), var(--teal)); }
.card > * { animation: rise .6s var(--ease) both; }
.card > :nth-child(2) { animation-delay: .06s; } .card > :nth-child(3) { animation-delay: .12s; } .card > :nth-child(4) { animation-delay: .18s; }
.card > :nth-child(5) { animation-delay: .24s; } .card > :nth-child(6) { animation-delay: .3s; } .card > :nth-child(7) { animation-delay: .36s; }
.card h1 { font-size: clamp(28px, 5.4vw, 42px); margin: 14px 0 10px; }
.card p { margin: 0 0 12px; }
.chip { display: inline-block; margin-top: 22px; width: fit-content; padding: 5px 12px; border-radius: 999px; background: var(--ink); color: var(--bone); font: 700 12px var(--display); letter-spacing: .08em; text-transform: uppercase; }
.chip.warn { background: var(--pink); color: #fff; }
.lede { font-size: 18px; }
.timing { padding: 12px 16px; border-radius: 14px; background: rgba(47, 107, 255, .09); border-left: 4px solid var(--blue); }
.terms { max-height: 190px; overflow: auto; margin: 16px 0; padding: 14px 16px; border-radius: 14px; background: rgba(18, 20, 43, .05); font-size: 14.5px; }
.terms p { margin: 0 0 8px; }
.light label.agree { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 18px; font-weight: 600; cursor: pointer; }
.agree input { width: 22px; height: 22px; margin-top: 1px; accent-color: var(--orange); flex: none; }
.fine { font-size: 13px; opacity: .6; margin: 0; }
.light .dimtxt { opacity: .65; font-size: 14.5px; }
.notice { padding: 14px 16px; border-radius: 14px; margin-top: 16px; }
.notice.ok { background: rgba(18, 181, 166, .14); border-left: 4px solid var(--teal); }
form.req { margin-top: 18px; display: grid; gap: 12px; }
form.req label, .light label { font: 600 14px var(--body); display: grid; gap: 6px; }
form.req label span { font-weight: 400; opacity: .6; }
.light input:not([type=checkbox]), .light textarea { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1.5px solid rgba(18, 20, 43, .18); background: #fff; font-size: 16px; }
form.req .btn { justify-self: start; }

/* viewing frame */
#viewer { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; background: var(--ink); }
#viewer .wash { display: none; }
.vbar { flex: none; display: flex; align-items: center; gap: 14px; padding: 8px 14px; background: var(--bone); border-bottom: 3px solid transparent;
  border-image: linear-gradient(90deg, var(--orange), var(--pink), var(--blue), var(--teal)) 1; }
.vfor { flex: 1; min-width: 0; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vtime { flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 6px 13px; border-radius: 999px; background: var(--ink); color: var(--bone); font: 500 13.5px var(--mono); }
.vtime i { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); animation: pulse 1.6s infinite; }
.vtime.low { background: var(--pink); } .vtime.low i { background: #fff; }
.vstage { flex: 1; position: relative; min-height: 0; }
.vstage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
#wm { position: absolute; inset: -40%; z-index: 2; pointer-events: none; user-select: none; display: flex; flex-wrap: wrap; align-content: center; justify-content: center; gap: 13vh 7vw;
  transform: rotate(-24deg); font: 700 14px var(--display); letter-spacing: .04em; color: #fff; opacity: .1; mix-blend-mode: difference; }
#wm span { white-space: nowrap; }
#vtoast { position: absolute; z-index: 3; left: 50%; bottom: 18px; transform: translateX(-50%); padding: 10px 18px; border-radius: 999px; background: var(--pink); color: #fff; font-weight: 600; font-size: 14px; box-shadow: 0 10px 30px -10px #000; animation: rise .4s var(--ease); }
.ended { position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; padding: 20px; background: radial-gradient(circle at 30% 20%, #2a2f66, var(--ink)); overflow: auto; }
.ended[hidden], #vtoast[hidden], .vtime[hidden] { display: none; }
.ended .card { background: var(--bone); }
@media (max-width: 560px) { .vfor { font-size: 12.5px; } .vbar .brand b { display: none; } .vbar { gap: 10px; padding: 6px 10px; } }

/* =====================================================================
   DARK: the owner's control room
   ===================================================================== */
body.dark { background: var(--ink); color: var(--bone); min-height: 100vh; display: grid; grid-template-columns: 232px 1fr;
  background-image: radial-gradient(900px 500px at 100% -10%, rgba(47, 107, 255, .16), transparent 60%), radial-gradient(700px 420px at -10% 110%, rgba(255, 107, 44, .12), transparent 60%); background-attachment: fixed; }
.rail { position: sticky; top: 0; height: 100vh; padding: 22px 14px; display: flex; flex-direction: column; gap: 4px; border-right: 1px solid var(--line); background: rgba(18, 20, 43, .7); backdrop-filter: blur(12px); }
.rail .logo { display: grid; margin: 0 8px 22px; text-decoration: none; font: 800 21px var(--display); letter-spacing: -.02em; }
.rail .logo em { font-style: normal; background: linear-gradient(90deg, var(--orange), var(--pink)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.rail .logo small { font: 500 11px var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--mist); margin-top: 2px; }
.rail > a:not(.logo) { display: flex; align-items: center; justify-content: space-between; padding: 11px 12px; border-radius: 12px; text-decoration: none; font-weight: 600; color: var(--mist); transition: background .2s, color .2s; }
.rail > a:not(.logo):hover { background: var(--ink-2); color: var(--bone); }
.rail > a.on { background: linear-gradient(100deg, rgba(255, 107, 44, .2), rgba(255, 79, 139, .1)); color: var(--bone); box-shadow: inset 3px 0 0 var(--orange); }
.rail form { margin-top: auto; }
.linkish { background: none; border: 0; padding: 11px 12px; color: var(--mist); cursor: pointer; font-weight: 600; }
.linkish:hover { color: var(--bone); }
.badge { font: 500 11px var(--mono); font-style: normal; background: var(--pink); color: #fff; padding: 2px 8px; border-radius: 999px; }

.main { padding: clamp(18px, 3.2vw, 40px); min-width: 0; max-width: 1280px; }
.main.solo { grid-column: 1 / -1; max-width: none; display: grid; place-items: center; }
.main > * { animation: rise .5s var(--ease) both; }
.main > :nth-child(2) { animation-delay: .05s; } .main > :nth-child(3) { animation-delay: .1s; } .main > :nth-child(4) { animation-delay: .15s; } .main > :nth-child(n+5) { animation-delay: .2s; }
.top { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.top h1 { font-size: clamp(28px, 3.6vw, 44px); }
.top h1 small, .req h3 small { font: 600 .45em var(--body); color: var(--mist); letter-spacing: 0; margin-left: 6px; }
.sub { margin: 8px 0 0; color: var(--mist); }
.crumb { margin: 0 0 6px; font: 500 12px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--mist); }
.flash { padding: 12px 16px; border-radius: 12px; margin-bottom: 18px; background: rgba(18, 181, 166, .16); border: 1px solid rgba(18, 181, 166, .5); font-weight: 600; }
.flash.bad { background: rgba(255, 79, 139, .14); border-color: rgba(255, 79, 139, .55); }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.tile { padding: 16px 18px; border-radius: 18px; background: linear-gradient(160deg, var(--ink-3), var(--ink-2)); border: 1px solid var(--line); display: grid; gap: 2px; position: relative; overflow: hidden; }
.tile b { font: 800 clamp(20px, 2.2vw, 30px) var(--display); letter-spacing: -.02em; }
.tile span { color: var(--mist); font-size: 13.5px; }
.tile.teal { border-color: var(--teal); box-shadow: inset 0 0 40px -18px var(--teal); }
.tile.pink { border-color: var(--pink); box-shadow: inset 0 0 40px -18px var(--pink); }

.panel { background: rgba(26, 29, 58, .78); border: 1px solid var(--line); border-radius: 22px; padding: clamp(16px, 2.2vw, 26px); margin-bottom: 18px; }
.panel h2 { font-size: 20px; margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
.panel h3 { font-size: 15px; margin: 0 0 8px; }
.empty, .dark .dimtxt { color: var(--mist); }
.empty { margin: 0; }
.hint { color: var(--mist); font-size: 13px; margin: 10px 0 0; }

.tbl { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.tbl th { text-align: left; font: 500 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--mist); padding: 0 12px 10px 0; white-space: nowrap; }
.tbl td { padding: 11px 12px 11px 0; border-top: 1px solid var(--line); vertical-align: top; }
.tbl a { text-decoration-color: var(--orange); text-underline-offset: 3px; }
.panel { overflow-x: auto; }
.log .when { white-space: nowrap; color: var(--mist); }
.k { font: 500 12px var(--mono); padding: 2px 8px; border-radius: 6px; background: var(--ink-3); white-space: nowrap; }
.k-blocked, .k-revoked, .k-declined { background: rgba(255, 79, 139, .22); color: #ffb3cd; }
.k-open, .k-timer, .k-granted { background: rgba(18, 181, 166, .2); color: #8be9df; }
.k-request { background: rgba(255, 214, 64, .2); color: var(--sun); }
.st { display: inline-block; font: 700 12.5px var(--display); padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.st.blue { background: rgba(47, 107, 255, .22); color: #a9c3ff; } .st.teal { background: rgba(18, 181, 166, .22); color: #8be9df; }
.st.dim { background: var(--ink-3); color: var(--mist); } .st.pink { background: rgba(255, 79, 139, .22); color: #ffb3cd; }

.dark label { display: grid; gap: 6px; font-weight: 600; font-size: 14px; }
.dark label span, .dark label em { font-weight: 400; font-style: normal; color: var(--mist); }
.dark input:not([type=checkbox]):not([type=file]), .dark select, .dark textarea { width: 100%; min-height: 44px; padding: 9px 12px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--ink); font-size: 15px; }
.dark textarea { min-height: 0; line-height: 1.5; }
.dark input:focus, .dark select:focus, .dark textarea:focus { border-color: var(--orange); outline: none; }
.dark input[type=file] { padding: 10px 0; }
.dur { display: flex; gap: 8px; align-items: center; }
.dur input { width: 96px !important; flex: none; } .dur select { width: auto !important; }
.dark label.tog, .tog { display: flex; align-items: center; gap: 9px; font-weight: 600; cursor: pointer; }
.tog input { width: 19px; height: 19px; accent-color: var(--orange); flex: none; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px 20px; align-items: end; }
.grid .wide, .grid .row { grid-column: 1 / -1; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

article.req { display: grid; grid-template-columns: 1fr minmax(280px, 380px); gap: 20px; padding: 18px 0; border-top: 1px solid var(--line); }
article.req:first-of-type { border-top: 0; padding-top: 0; }
article.req h3 { font-size: 18px; }
article.req blockquote { margin: 10px 0 0; padding: 10px 14px; border-left: 3px solid var(--sun); background: var(--ink); border-radius: 0 12px 12px 0; }
.grant { display: grid; gap: 10px; }
.grant label:not(.tog) { grid-template-columns: auto; }
.grant input[type=number] { width: 96px !important; display: inline-block; }

.copyrow { display: flex; gap: 10px; flex-wrap: wrap; }
.copyrow input { flex: 1 1 320px; }
details { margin-top: 14px; } summary { cursor: pointer; font-weight: 600; color: var(--mist); } details[open] summary { margin-bottom: 10px; }
details textarea { margin-bottom: 10px; }
.controls { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; }
.controls form, .stack { display: grid; gap: 10px; align-content: start; }
.controls p { margin: 0; font-size: 13.5px; }
.controls .btn { justify-self: start; }
.controls input[type=number] { width: 96px !important; }

.split { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(220px, 1fr); gap: 26px; }
.split h3 { margin-top: 4px; } .split ol + h3 { margin-top: 22px; }
.heatbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 12px; }
.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--ink); border: 1px solid var(--line); }
.seg button { border: 0; background: none; padding: 7px 14px; border-radius: 999px; font: 700 13px var(--display); color: var(--mist); cursor: pointer; }
.seg button.on { background: var(--bone); color: var(--ink); }
.heatn { font: 500 12.5px var(--mono); color: var(--mist); margin-left: auto; }
.heatstage { position: relative; aspect-ratio: 16 / 10; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: #000; }
.heatstage.phone { aspect-ratio: 9 / 19; max-width: 300px; margin-inline: auto; }
.heatstage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; filter: saturate(.6) brightness(.75); }
.heatstage.through iframe { filter: none; }
.heatstage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.bars li { position: relative; display: flex; justify-content: space-between; gap: 10px; padding: 7px 10px; border-radius: 9px; background: var(--ink); overflow: hidden; font-size: 14px; }
.bars li i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, rgba(47, 107, 255, .4), rgba(18, 181, 166, .32)); border-radius: 9px; }
.bars .bl, .bars .bn { position: relative; z-index: 1; } .bars .bl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .bars .bn { font-family: var(--mono); }

.authbox { width: min(440px, 100%); padding: 34px; border-radius: 26px; background: rgba(26, 29, 58, .85); border: 1px solid var(--line); position: relative; overflow: hidden; }
.authbox::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 5px; background: linear-gradient(90deg, var(--orange), var(--pink), var(--blue), var(--teal)); }
.authbox h1 { font-size: 32px; margin-bottom: 8px; } .authbox p { color: var(--mist); margin: 0 0 18px; }
.authbox form { display: grid; gap: 14px; } .authbox .btn { justify-self: start; }

@media (max-width: 860px) {
  body.dark { grid-template-columns: 1fr; }
  .rail { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 10px 12px; border-right: 0; border-bottom: 1px solid var(--line); }
  .rail .logo { margin: 0 10px 0 4px; } .rail .logo small { display: none; } .rail form { margin: 0 0 0 auto; }
  article.req, .split { grid-template-columns: 1fr; }
}
