/* Welcome Apps — the page around a real app: sign-in, the top strip and its menu. */
@font-face { font-family: "Inter"; src: url("/engine/assets/fonts/InterVariable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
:root { --ink: #1C1C1E; --muted: #6E6E73; --bg: #F2F2F7; --surface: #FFFFFF; --field: rgba(118, 118, 128, .12); --accent: #0A84FF; color-scheme: light; }
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, Arial, sans-serif; font-size: 16px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.signin { min-height: 100%; display: grid; place-items: center; padding: 24px; }
.signin-card, .dialog form { display: grid; gap: 14px; width: min(100%, 380px); padding: 28px; border-radius: 22px; background: var(--surface); box-shadow: 0 20px 50px -24px rgba(0, 0, 0, .3); }
.signin-card h1, .dialog h2 { margin: 0; font-size: 26px; letter-spacing: -.03em; }
.signin-lede { margin: -8px 0 4px; color: var(--muted); }
.signin-small { margin: 0; font-size: 13.5px; color: var(--muted); }
label { display: grid; gap: 6px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
label small { font-weight: 500; }
input, textarea { width: 100%; color: var(--ink); font-weight: 500; padding: 12px 14px; border: 1.5px solid transparent; border-radius: 12px; background: var(--field); outline: none; resize: vertical; }
input:focus, textarea:focus { border-color: var(--accent); background: var(--surface); }
select { width: 100%; color: var(--ink); font-weight: 500; padding: 12px 40px 12px 14px; border: 1.5px solid transparent; border-radius: 12px; outline: none; -webkit-appearance: none; appearance: none;
  background: var(--field) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%236E6E73' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 16px center; }
select:focus { border-color: var(--accent); }
button[type="submit"] { padding: 13px; border: 0; border-radius: 14px; background: var(--accent); color: #fff; font-weight: 700; cursor: pointer; }
button.quiet { padding: 13px; border: 0; border-radius: 14px; background: var(--field); font-weight: 700; cursor: pointer; }
.notice { margin: 0; padding: 10px 12px; border-radius: 10px; background: rgba(255, 59, 48, .12); color: #B3261E; font-size: 14px; font-weight: 600; }

.shell { height: 100%; height: 100dvh; display: grid; grid-template-rows: auto auto minmax(0, 1fr); }
.strip { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 14px; padding-top: max(6px, env(safe-area-inset-top)); background: #1C1C1E; color: #fff; font-size: 13px; font-weight: 600; }
.strip.is-warning { background: #B3261E; }
.strip.is-due { background: #9A5B00; }
.strip.is-soon { background: #24497A; }
.strip span { line-height: 1.35; }
.strip button { padding: 5px 12px; border: 0; border-radius: 99px; background: rgba(255, 255, 255, .16); color: #fff; font-size: 13px; font-weight: 600; cursor: pointer; }
.menu { position: absolute; z-index: 20; top: 40px; right: 10px; display: grid; min-width: 220px; padding: 6px; border-radius: 14px; background: var(--surface); box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .35); max-height: calc(100dvh - 56px); overflow-y: auto; overscroll-behavior: contain; }
.menu-head { margin: 8px 12px 2px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.menu button { padding: 11px 12px; border: 0; border-radius: 10px; background: none; text-align: left; font-weight: 600; cursor: pointer; }
.menu button:hover { background: var(--field); }
#app { min-height: 0; height: 100%; }

.dialog { padding: 0; border: 0; border-radius: 22px; background: none; }
.dialog::backdrop { background: rgba(0, 0, 0, .45); }
.dialog form { width: min(92vw, 460px); max-height: 88vh; overflow-y: auto; }
.dialog-lede { margin: -8px 0 0; color: var(--muted); font-size: 14.5px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 480px) { .pair { grid-template-columns: 1fr; } }
.team { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.team li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--field); }
.team li > span { flex: 1; min-width: 0; display: grid; }
#teamList li { flex-wrap: wrap; }
#teamList li > span { flex: 1 1 100%; }
#teamList li > button:first-of-type { margin-left: auto; }
.team b { font-size: 15px; }
.team small { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.team button { padding: 6px 10px; border: 0; border-radius: 99px; background: var(--surface); font-size: 12.5px; font-weight: 700; cursor: pointer; }
.team button.danger { color: #B3261E; }
.handover { margin: 0; padding: 12px; border-radius: 12px; background: rgba(48, 179, 82, .14); font-size: 14.5px; }
.handover code { display: block; margin-top: 6px; font-size: 16px; font-weight: 700; letter-spacing: .02em; user-select: all; }
.kinds { display: grid; gap: 6px; }
.kinds label { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--field); color: var(--ink); font-size: 14.5px; font-weight: 600; cursor: pointer; }
.kinds input { flex: none; width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.kinds label:has(input:disabled) { opacity: .45; cursor: default; }
.pay-details { display: grid; grid-template-columns: auto 1fr auto; gap: 8px 12px; align-items: center; margin: 0; padding: 12px; border-radius: 12px; background: var(--field); font-size: 14.5px; }
.pay-details dt { color: var(--muted); }
.pay-details dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.pay-details button { padding: 4px 10px; border: 0; border-radius: 99px; background: var(--surface); font-size: 12.5px; font-weight: 700; cursor: pointer; }
.logo-line { display: flex; align-items: center; gap: 12px; }
.logo-line img { width: 56px; height: 56px; object-fit: contain; border-radius: 12px; background: #fff; box-shadow: inset 0 0 0 1px var(--line, rgba(0,0,0,.1)); }
.logo-pick { position: relative; padding: 9px 14px; border-radius: 99px; background: var(--field); font-weight: 700; font-size: 14px; cursor: pointer; }
.logo-pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.kinds-note { margin: 0; color: var(--muted); font-size: 13.5px; }
.requests-title { margin: 6px 0 0; font-size: 14px; color: var(--muted); }
.requests small { white-space: normal; overflow: visible; }
.requests .reply { margin-top: 4px; color: var(--ink); }
.plain { display: grid; gap: 10px; margin: 0; padding-left: 20px; font-size: 14.5px; }
.dialog-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.link-btn { padding: 4px; border: 0; background: none; color: var(--accent); font-size: 14px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.notice-ok { background: rgba(48, 179, 82, .14); color: #1D6B33; }
label.check { display: flex; align-items: flex-start; gap: 10px; color: var(--ink); font-size: 14.5px; cursor: pointer; }
label.check input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--accent); }
.handover a { color: inherit; font-weight: 700; word-break: break-all; }
.menu button.menu-idea { color: var(--accent, #0A84FF); border-bottom: 1px solid var(--field); border-radius: 10px 10px 0 0; }
.menu button.menu-danger { color: #B3261E; border-top: 1px solid var(--field); border-radius: 0 0 10px 10px; }
button[type="submit"].danger { background: #B3261E; }
.signin-new { text-align: center; }
.signin-new a { color: var(--ink); font-weight: 700; }
.welcome:empty { display: none; }
.welcome { padding: 10px 14px 12px; background: var(--surface); border-bottom: 1px solid var(--field); }
.welcome-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.welcome-head b { font-size: 15px; }
.welcome-head small { color: var(--muted); font-weight: 600; }
.welcome-head button, .welcome-steps button { border: 0; background: none; font-weight: 700; font-size: 14px; color: var(--accent); cursor: pointer; padding: 6px 4px; }
.welcome-steps { margin: 8px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.welcome-steps li { display: grid; grid-template-columns: 24px 1fr auto; align-items: center; gap: 10px; font-size: 14.5px; }
.welcome-steps .tick { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--field); font-size: 13px; font-weight: 800; color: #fff; }
.welcome-steps li.done .tick { background: #30B352; border-color: #30B352; }
.welcome-steps li.done span:nth-child(2) { color: var(--muted); text-decoration: line-through; }
.welcome-note { margin: 8px 0 0; font-size: 14px; color: var(--muted); }
.welcome-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 14px; font-weight: 600; }

.cards-points { margin: 0; padding-left: 20px; display: grid; gap: 6px; color: var(--muted); font-size: 14.5px; }
.face-btn { margin-top: -4px; }
.face-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.face-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--field); }
.signin-brand { margin: 0 0 -6px; font-weight: 800; font-size: 15px; letter-spacing: .02em; background: linear-gradient(90deg, #FF7A3D, #FF2D78 50%, #8B5CFF); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cal-buttons { display: grid; gap: 8px; }
.btn-link { display: block; padding: 13px 16px; border-radius: 12px; background: var(--field); color: var(--ink); font-weight: 700; text-align: center; text-decoration: none; }
.auto-pay { display: grid; gap: 10px; padding: 14px; border-radius: 14px; background: var(--field); }
.auto-pay h3, .pay-or { margin: 0; font-size: 17px; }
.auto-pay-currency { display: flex; align-items: center; gap: 10px; }
.auto-pay-currency select { width: auto; }
.welcome-acts { display: flex; gap: 2px; }
#stayLinks small, #stayList small { overflow-wrap: anywhere; }
.copy-line { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--field); }
.copy-line span { flex: 1; min-width: 0; font-size: 13.5px; overflow-wrap: anywhere; }
.site-more { border-radius: 12px; background: var(--field); padding: 0 14px; }
.site-more > summary { padding: 13px 0; font-weight: 700; cursor: pointer; list-style: none; display: flex; justify-content: space-between; }
.site-more > summary::after { content: '+'; color: var(--accent); font-weight: 800; }
.site-more[open] > summary::after { content: '−'; }
.site-more[open] { padding-bottom: 14px; display: grid; gap: 10px; }
.site-more input, .site-more textarea, .site-more select { background: var(--surface); }
.site-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.site-photo { position: relative; display: grid; gap: 4px; }
.site-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; }
.site-photo.is-cover img { outline: 3px solid var(--accent); outline-offset: -3px; }
.site-photo button { border: 0; background: none; font-size: 12.5px; font-weight: 700; color: var(--accent); padding: 2px 0; cursor: pointer; }
.site-photo button:disabled { color: var(--muted); }
.site-row { display: grid; grid-template-columns: 1fr auto; gap: 6px; padding: 10px; border-radius: 12px; background: var(--surface); }
.site-row textarea, .site-row .link-btn { grid-column: 1 / -1; }
.site-row .link-btn { justify-self: end; }
.site-ticks { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; }
.site-label { margin: 4px 0 0; font-weight: 700; font-size: 14px; color: var(--muted); }
.site-more .site-row input, .site-more .site-row textarea, .site-more .site-row select { background: var(--field); }
.import-map { display: grid; gap: 8px; }
.import-map label { display: grid; grid-template-columns: 40% 1fr; align-items: center; gap: 10px; }
.import-map label span { font-weight: 600; font-size: 14px; }
.push-kinds { display: grid; gap: 2px; margin: 4px 0 8px; }
.push-kinds label.check { padding: 7px 2px; line-height: 1.35; }
.leads-how { margin: 10px 0; padding: 10px 12px; border-radius: 12px; background: var(--field); font-size: 14px; }
.leads-how summary { font-weight: 600; cursor: pointer; }
.leads-how p { margin: 8px 0 0; line-height: 1.45; }
#leadsDialog .link-btn { display: block; margin-top: 6px; }

/* Colour and look (menu → Settings). Light or dark is per person, per device; the colour is the app's own. */
:root[data-mode="dark"] { --ink: #FFFFFF; --muted: #A1A1A8; --bg: #000000; --surface: #1C1C1E; --field: rgba(118, 118, 128, .26); color-scheme: dark; }
:root[data-mode="dark"] .notice { color: #FF8A80; }
:root[data-mode="dark"] .notice-ok { color: #7EE29A; }
:root[data-mode="dark"] .menu button.menu-danger { color: #FF8A80; }
:root[data-mode="dark"] .logo-line img { background: #2C2C2E; }
.swatches { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.swatch { width: 42px; height: 42px; padding: 0; border: 3px solid var(--surface); border-radius: 50%; cursor: pointer; box-shadow: 0 0 0 1px var(--field); }
.swatch[aria-checked="true"] { box-shadow: 0 0 0 3px var(--ink); }
.swatch:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.dialog-one { grid-template-columns: 1fr; }

/* The welcome, and asking what people think. */
.hello-mark { margin: 0; font-size: 40px; line-height: 1; }
.hello-points { display: grid; gap: 8px; margin: 0; padding-left: 20px; font-size: 14.5px; }
.hello-ask { margin: 0; padding: 12px 14px; border-radius: 14px; background: var(--field); font-size: 14.5px; }
.feels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.feels label { position: relative; display: block; color: var(--ink); cursor: pointer; }
.feels input { position: absolute; opacity: 0; }
.feels span { display: grid; justify-items: center; gap: 4px; padding: 12px 6px; border: 2px solid transparent; border-radius: 14px; background: var(--field); font-size: 13.5px; font-weight: 700; text-align: center; }
.feels b { font-size: 26px; line-height: 1; }
.feels input:checked + span { border-color: var(--accent); background: var(--surface); }
.feels input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.ask-card { display: grid; gap: 8px; }
.ask-card p { margin: 0; color: var(--muted); font-size: 14px; }
.ask-feels { display: flex; flex-wrap: wrap; gap: 8px; }
.ask-feels button { padding: 8px 12px; border: 0; border-radius: 99px; background: var(--field); font-size: 14px; font-weight: 700; cursor: pointer; }
.ask-feels button.link-btn { background: none; padding: 8px 4px; }

/* The new look (per person, Colour and look): the top strip goes light, with the free-month line as a small badge.
   Warnings (payment due, locked, ending soon) keep their strong colours. */
:root[data-fresh] .strip:not(.is-warning):not(.is-due):not(.is-soon) { background: color-mix(in srgb, var(--accent, #0A84FF) 13%, var(--bg)); color: var(--ink); padding-bottom: 2px; }
:root[data-fresh] .strip:not(.is-warning):not(.is-due):not(.is-soon) span { padding: 4px 11px; border-radius: 99px; font-size: 12.5px; font-weight: 700;
  color: color-mix(in srgb, var(--accent, #0A84FF) 80%, var(--ink)); background: color-mix(in srgb, var(--accent, #0A84FF) 14%, transparent); }
:root[data-fresh] .strip:not(.is-warning):not(.is-due):not(.is-soon) button { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 6px 16px -10px rgba(0, 0, 0, .3); }
:root[data-fresh] .strip span:empty { display: none; }
:root[data-fresh] body { background: var(--bg); }
