/* ============================================================
   Phone-app prototypes + the overlay that opens them.
   Shared so a demo card can open its phone in place on any page.
   (Kept identical to the inline copy that renders the showroom wall.)
   ============================================================ */

.appcell { display: grid; gap: 16px; justify-items: center; }
.appcell__cap { text-align: center; max-width: 300px; }
.appcell__cap b { display: block; font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: 5px; }
.appcell__cap span { font-size: 13.5px; color: var(--ink-soft); line-height: 1.5; }

/* device frame - width tracks the viewport so it never overflows a phone */
.device {
  width: min(300px, 82vw); aspect-ratio: 300 / 624; background: #0c0c10; border-radius: 42px;
  padding: 13px; position: relative;
  box-shadow: 0 26px 54px -20px rgba(21,20,15,.45), inset 0 0 0 3px #26262d;
}
.device::before { /* notch */
  content: ""; position: absolute; top: 24px; left: 50%; transform: translateX(-50%);
  width: 96px; height: 22px; border-radius: 12px; background: #0c0c10; z-index: 6;
}
.screen {
  --brand: #333; --brand-fg: #fff; --appbg: #fff; --appfg: #17140f; --muted: #7b756a;
  width: 100%; height: 100%; border-radius: 30px; overflow: hidden;
  background: var(--appbg); color: var(--appfg);
  display: flex; flex-direction: column; position: relative;
  font-size: 13.5px;
}
.sbar { display: flex; justify-content: space-between; align-items: center; padding: 9px 20px 3px; font-family: var(--mono); font-size: 10.5px; color: var(--appfg); flex: 0 0 auto; }
.sbar .dots { letter-spacing: 1px; opacity: .7; }

/* app top bar */
.ahd { flex: 0 0 auto; background: var(--brand); color: var(--brand-fg); padding: 12px 16px 13px; }
.ahd b { font-size: 16px; letter-spacing: .01em; display: block; }
.ahd span { font-family: var(--mono); font-size: 9.5px; letter-spacing: .1em; opacity: .8; text-transform: uppercase; }

/* scrollable views */
.views { flex: 1; position: relative; overflow: hidden; }
.view { position: absolute; inset: 0; overflow-y: auto; padding: 14px 14px 20px; display: none; }
.view.is-on { display: block; animation: vfade .25s ease; }
@keyframes vfade { from { opacity: 0; transform: translateY(4px); } }
.view::-webkit-scrollbar { width: 5px; }
.view::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--muted) 45%, transparent); border-radius: 3px; }

.vtitle { font-size: 19px; font-weight: 700; letter-spacing: -.01em; margin-bottom: 3px; }
.vsub { font-size: 12px; color: var(--muted); margin-bottom: 14px; }
.vlabel { font-family: var(--mono); font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 16px 0 8px; }

/* generic list row / card */
.arow {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border: 1px solid color-mix(in srgb, var(--appfg) 14%, transparent);
  border-radius: 12px; padding: 11px 12px; margin-bottom: 8px; background: color-mix(in srgb, var(--appfg) 2%, var(--appbg));
}
.arow__t b { font-size: 13.5px; display: block; }
.arow__t span { font-size: 11px; color: var(--muted); }
.aprice { font-family: var(--mono); font-weight: 700; font-size: 13px; }

/* small action button */
.abtn {
  border: 0; cursor: pointer; font: 700 12px var(--display);
  background: var(--brand); color: var(--brand-fg);
  padding: 8px 13px; border-radius: 9px; white-space: nowrap; flex: 0 0 auto;
}
.abtn:active { transform: scale(.96); }
.abtn--ghost { background: transparent; color: var(--brand); box-shadow: inset 0 0 0 1.5px var(--brand); }
.abtn--done { background: color-mix(in srgb, var(--appfg) 8%, var(--appbg)); color: var(--muted); box-shadow: none; }
.abtn--wide { display: block; width: 100%; padding: 13px; border-radius: 12px; font-size: 13.5px; margin-top: 6px; }

/* selectable chips */
.achips { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 6px; }
.achip {
  font-family: var(--mono); font-size: 11px; padding: 7px 11px; border-radius: 8px; cursor: pointer;
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--appfg) 22%, transparent); user-select: none;
}
.achip.is-sel { background: var(--brand); color: var(--brand-fg); box-shadow: none; }

/* progress bar */
.aprog { height: 8px; border-radius: 5px; background: color-mix(in srgb, var(--appfg) 10%, transparent); overflow: hidden; margin: 8px 0; }
.aprog i { display: block; height: 100%; background: var(--brand); width: 0; transition: width .5s ease; }

/* hero tile / banner */
.abanner { border-radius: 14px; padding: 15px; margin-bottom: 12px; background: color-mix(in srgb, var(--brand) 12%, var(--appbg)); }
.abanner b { font-size: 15px; } .abanner p { font-size: 12px; color: var(--muted); margin-top: 3px; }
.abig { font-size: 34px; font-weight: 700; letter-spacing: -.02em; } .abig small { font-size: 13px; color: var(--muted); font-weight: 400; }

/* coffee stamp grid */
.cups { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 6px 0 4px; }
.cup { aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; font-size: 16px; color: transparent;
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--brand) 45%, transparent); }
.cup.f { background: var(--brand); color: var(--brand-fg); box-shadow: none; }

/* timeline */
.tl { list-style: none; margin: 4px 0; padding-left: 4px; }
.tl li { position: relative; padding: 0 0 16px 20px; font-size: 12.5px; }
.tl li::before { content: ""; position: absolute; left: 3px; top: 3px; width: 9px; height: 9px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--brand); background: var(--appbg); }
.tl li::after { content: ""; position: absolute; left: 7px; top: 12px; bottom: 0; width: 1.5px; background: color-mix(in srgb, var(--appfg) 15%, transparent); }
.tl li:last-child::after { display: none; }
.tl li.done::before { background: var(--brand); }
.tl li b { display: block; } .tl li span { color: var(--muted); font-size: 11px; }

/* mini week bars */
.weekbars { display: flex; align-items: flex-end; gap: 6px; height: 74px; margin: 8px 0; }
.weekbars div { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.weekbars i { width: 100%; background: var(--brand); border-radius: 4px 4px 0 0; }
.weekbars span { font-family: var(--mono); font-size: 9px; color: var(--muted); }

/* tab bar */
.tabbar { flex: 0 0 auto; display: flex; border-top: 1px solid color-mix(in srgb, var(--appfg) 12%, transparent); background: color-mix(in srgb, var(--appfg) 3%, var(--appbg)); }
.a-tab {
  flex: 1; border: 0; background: transparent; cursor: pointer;
  padding: 9px 4px 11px; display: flex; flex-direction: column; align-items: center; gap: 4px;
  font-family: var(--mono); font-size: 9px; letter-spacing: .04em; color: var(--muted); position: relative;
}
.a-tab .ic { width: 20px; height: 20px; display: grid; place-items: center; font-size: 15px; line-height: 1; opacity: .65; }
.a-tab.is-on { color: var(--brand); }
.a-tab.is-on .ic { opacity: 1; }
.a-tab.is-on::before { content: ""; position: absolute; top: 0; left: 22%; right: 22%; height: 2.5px; border-radius: 2px; background: var(--brand); }

.toast {
  position: absolute; left: 12px; right: 12px; bottom: 68px; z-index: 8;
  background: var(--appfg); color: var(--appbg); border-radius: 10px; padding: 10px 12px;
  font-size: 12px; text-align: center; opacity: 0; transform: translateY(8px); transition: all .3s ease; pointer-events: none;
}
.toast.is-on { opacity: 1; transform: none; }

@media (max-width: 380px) {
  .device { padding: 10px; }
  .view { padding: 12px 11px 18px; }
}

/* ---- hidden app library + overlay ---- */
.app-stash[hidden] { display: none; }
.app-modal { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 20px; }
.app-modal[hidden] { display: none; }
.app-modal__scrim { position: absolute; inset: 0; background: rgba(21,20,15,.62); backdrop-filter: blur(3px); animation: appfade .2s ease; }
@keyframes appfade { from { opacity: 0; } }
.app-modal__panel {
  position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 14px;
  max-height: 92vh; animation: apprise .28s cubic-bezier(.16,1,.3,1);
}
@keyframes apprise { from { opacity: 0; transform: translateY(16px) scale(.97); } }
.app-modal__slot { display: flex; }
.app-modal__slot .appcell { gap: 14px; }
.app-modal__slot .appcell__cap { color: var(--paper); }
.app-modal__slot .appcell__cap b { color: var(--accent); }
.app-modal__slot .appcell__cap span { color: #d8d5cc; }
.app-modal__close {
  position: absolute; top: -6px; right: -6px; z-index: 3; width: 40px; height: 40px; border-radius: 50%;
  border: 1.5px solid var(--paper); background: var(--ink); color: var(--paper);
  font-size: 22px; line-height: 1; cursor: pointer; transition: transform .15s, background .15s;
}
.app-modal__close:hover { transform: scale(1.08); background: var(--accent); border-color: var(--accent); }
@media (max-width: 480px) { .app-modal__close { top: -4px; right: 4px; } }
