/* The Kiss of Shame — Rev 2 demo. The original interface, on the web. */

:root { --pink: rgb(255, 55, 98); --hot: rgb(255, 26, 41); }

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: #000;
  color: #98989d;
  font-family: -apple-system, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 18px 8px 32px;
}

.wrap { width: min(980px, 100%); }

/* ============ the 960x703 stage, scaled uniformly ============ */
.stage-holder { position: relative; margin: 0 auto; }
.stage {
  position: relative;
  width: 960px;
  height: 703px;
  transform-origin: top left;
  user-select: none;
  --shift: 0px; /* -437px when the reels are folded away */
}
.stage.collapsed { height: 266px; }
.stage.collapsed .reels { display: none; }

.backlight {
  position: absolute;
  left: 0; top: calc(437px + var(--shift)); width: 960px; height: 266px;
  background: var(--pink);
  transition: opacity .25s, background-color .25s;
}
body.extreme .backlight { background: var(--hot); }
body.bypassed .backlight { opacity: .25; }

.face {
  position: absolute;
  left: 0; top: 0; width: 960px; height: 703px;
  background: url("assets/fond_alpha.webp") no-repeat;
  background-size: 960px 703px;
  pointer-events: none;
}
.stage.collapsed .face {
  height: 266px;
  background-image: url("assets/fond_alone2.webp");
  background-size: 960px 266px;
}

.reels { position: absolute; left: 0; top: 0; cursor: grab; touch-action: none; }
.reels:active { cursor: grabbing; }

.extreme-glow {
  position: absolute;
  left: 366px; top: calc(456px + var(--shift));
  width: 244px; height: 233px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,26,41,.45) 0%, rgba(255,26,41,0) 70%);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}
body.extreme .extreme-glow { opacity: 1; animation: throb 1.1s ease-in-out infinite; }
@keyframes throb { 50% { opacity: .65; } }

/* every filmstrip control */
.strip {
  position: absolute;
  background-repeat: no-repeat;
  touch-action: none;
}
.knob { cursor: ns-resize; }
.click { cursor: pointer; }
body.bypassed #k-shame, body.bypassed #shameRing { opacity: .25; }
.linkbtn { opacity: .25; transition: opacity .15s; }
.linkbtn.on { opacity: 1; }

/* ============ transport ============ */
.transport {
  display: flex; gap: 12px; align-items: center; justify-content: center;
  margin-top: 16px;
}
#source {
  background: #1c1c1e; color: #e8e8ea; border: 1px solid #3a3a3c;
  border-radius: 8px; padding: 10px 12px; font: 600 12px/1 inherit;
}
.play {
  background: linear-gradient(rgb(255,86,122), rgb(204,32,69));
  border: none; border-radius: 9px; color: #fff;
  font: 800 13px/1 inherit; letter-spacing: .08em; padding: 12px 26px; cursor: pointer;
  box-shadow: 0 0 22px rgba(255,55,98,.4), inset 0 1px 0 rgba(255,255,255,.3);
  transition: transform .1s;
}
.play:active { transform: scale(.97); }
.gh { color: #98989d; font-size: 11px; text-decoration: none; }
.gh:hover { color: #e8e8ea; }

.footnote {
  margin: 14px auto 0; max-width: 640px; text-align: center;
  font-size: 11px; line-height: 1.6;
}
.footnote b { color: var(--pink); }

/* ============ masthead ============ */
.masthead {
  display: flex; align-items: center; gap: 12px;
  padding: 4px 2px 14px;
}
.masthead .mark { width: 15px; height: 22px; color: var(--pink); filter: drop-shadow(0 0 8px rgba(255,55,98,.5)); }
.masthead h1 { font-size: 14px; letter-spacing: .14em; color: #e8e8ea; font-weight: 800; }
.masthead .dia { color: var(--pink); margin: 0 2px; }
.masthead .sub { color: #98989d; font-weight: 600; }
.masthead .rev {
  margin-left: 8px; font-size: 9px; letter-spacing: .12em; color: var(--pink);
  border: 1px solid rgba(255,55,98,.45); border-radius: 4px; padding: 3px 7px; vertical-align: 2px;
}

/* ============ transport extras ============ */
.download {
  background: transparent;
  border: 1.4px solid var(--pink); border-radius: 9px; color: var(--pink);
  font: 800 12px/1 inherit; letter-spacing: .08em; padding: 11px 18px; cursor: pointer;
  transition: all .15s;
}
.download:hover { background: rgba(255,55,98,.12); box-shadow: 0 0 18px rgba(255,55,98,.35); }
.download:disabled { opacity: .5; cursor: wait; }

/* ============ the manual ============ */
.manual { margin-top: 26px; display: grid; gap: 14px; }
.card {
  background: linear-gradient(#161618, #101012);
  border: 1px solid #29292c; border-radius: 14px;
  padding: 22px 26px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 8px 26px rgba(0,0,0,.45);
}
.card h2 {
  font-size: 13px; letter-spacing: .14em; color: var(--pink);
  text-transform: uppercase; margin-bottom: 14px;
}
.card p { font-size: 13.5px; line-height: 1.75; color: #c9c9ce; }
.card p + p { margin-top: 10px; }
.card b { color: #e8e8ea; }
.card i { color: #e0e0e4; }

.cta-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.btn {
  display: inline-block; text-decoration: none;
  border: 1.2px solid #3f3f44; border-radius: 8px;
  color: #c9c9ce; font: 700 11.5px/1 inherit; letter-spacing: .06em;
  padding: 11px 16px; transition: all .15s;
}
.btn:hover { border-color: var(--pink); color: #fff; }
.btn.solid {
  background: linear-gradient(rgb(255,86,122), rgb(204,32,69));
  border-color: transparent; color: #fff;
  box-shadow: 0 0 18px rgba(255,55,98,.35), inset 0 1px 0 rgba(255,255,255,.3);
}
.btn.solid:hover { filter: brightness(1.08); }
.btn.big { font-size: 13px; padding: 14px 24px; }

.params { display: grid; gap: 12px; }
.params > div {
  display: grid; grid-template-columns: 150px 1fr; gap: 14px;
  padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.05);
}
.params > div:last-child { border-bottom: none; }
.params dt { font: 800 11.5px/1.5 inherit; letter-spacing: .1em; color: #e8e8ea; }
.params dd { font-size: 13px; line-height: 1.7; color: #b9b9bf; }
.params dd b { color: var(--pink); }

.tips { list-style: none; display: grid; gap: 10px; }
.tips li {
  font-size: 13px; line-height: 1.7; color: #b9b9bf;
  padding-left: 20px; position: relative;
}
.tips li::before { content: "✚"; position: absolute; left: 0; color: var(--pink); font-size: 11px; top: 3px; }
.tips b { color: #e8e8ea; }

.uses { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.uses > div {
  background: rgba(255,255,255,.025); border: 1px solid rgba(255,255,255,.06);
  border-radius: 10px; padding: 16px 18px;
}
.uses h3 { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--pink); margin-bottom: 8px; }
.uses p { font-size: 12.5px; line-height: 1.7; color: #b9b9bf; }
.uses b { color: #e8e8ea; }

/* ============ legal ============ */
.legal { margin-top: 26px; text-align: center; display: grid; gap: 14px; justify-items: center; }
.legal p { font-size: 11.5px; line-height: 1.7; color: #8a8a90; max-width: 640px; }
.legal a { color: #c9c9ce; text-decoration: none; }
.legal a:hover { color: var(--pink); }
.legal .credits { font-size: 10.5px; color: #6f6f75; }

@media (max-width: 700px) {
  .params > div { grid-template-columns: 1fr; gap: 4px; }
  .masthead h1 { font-size: 11px; }
}

/* ============ secondary metering: signal-presence pulse ============ */
.stage { --pulse: 0; }
.knob::after {
  content: ""; position: absolute; inset: -10%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,55,98,.30) 0%, rgba(255,55,98,0) 68%);
  opacity: var(--pulse, 0);
  pointer-events: none;
}
#k-shame::after {
  inset: -13%;
  background: radial-gradient(circle, rgba(255,55,98,.42) 0%, rgba(255,55,98,0) 70%);
}
body.extreme #k-shame::after {
  background: radial-gradient(circle, rgba(255,26,41,.50) 0%, rgba(255,26,41,0) 70%);
}
body.bypassed .stage { --pulse: 0 !important; }

/* github mark inside the "View the Repo" button */
.gh-ico { width: 13px; height: 13px; vertical-align: -2px; margin-right: 6px; }

/* ============ storage-environment: chevron + direct-pick list ============ */
/* the chevron tucked against the right edge of the LED window */
#env::after {
  content: "";
  position: absolute;
  right: 9px; top: 50%;
  width: 7px; height: 7px;
  transform: translateY(-65%) rotate(45deg);
  border-right: 1.6px solid var(--pink);
  border-bottom: 1.6px solid var(--pink);
  opacity: .5;
  transition: opacity .15s;
  pointer-events: none;
}
#env:hover::after { opacity: 1; }
body.extreme #env::after { border-color: var(--hot); }

.env-menu {
  position: fixed;
  z-index: 1000;
  width: 320px; max-width: calc(100vw - 16px);
  padding: 8px;
  background: rgba(18,14,13,.94);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255,55,98,.4);
  border-radius: 14px;
  box-shadow: 0 20px 54px rgba(0,0,0,.62), 0 0 0 1px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.06);
  opacity: 0;
  transform: translateY(6px) scale(.98);
  transition: opacity .16s ease, transform .16s ease;
}
.env-menu.show { opacity: 1; transform: translateY(0) scale(1); }

.env-menu-head {
  font: 800 10px/1 inherit; letter-spacing: .2em;
  color: #8a7f78; text-align: center; padding: 8px 0 10px;
}

.env-row {
  display: flex; align-items: center; gap: 11px;
  width: 100%; text-align: left;
  background: transparent; border: none; cursor: pointer;
  padding: 9px 11px; border-radius: 9px;
  color: #e6ded2; font: inherit;
  transition: background .12s;
}
.env-row:hover { background: rgba(255,55,98,.1); }
.env-lamp {
  flex: none; width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,.18); transition: all .12s;
}
.env-row.sel .env-lamp { background: var(--pink); box-shadow: 0 0 9px rgba(255,55,98,.85); }
.env-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.env-name { font: 800 12.5px/1.2 inherit; letter-spacing: .02em; color: #e8e8ea; }
.env-row.sel .env-name { color: var(--pink); }
.env-blurb { font-size: 10.5px; line-height: 1.35; color: #97897c; }

.env-menu-foot { padding: 11px 11px 6px; }
.env-foot-label { display: block; font: 800 9px/1 inherit; letter-spacing: .14em; color: #8a7f78; margin-bottom: 6px; }
.env-age-track { display: block; height: 4px; border-radius: 2px; background: rgba(255,255,255,.1); overflow: hidden; }
.env-age-fill { display: block; height: 100%; border-radius: 2px; background: var(--pink); box-shadow: 0 0 8px rgba(255,55,98,.6); transition: width .15s; }
.env-menu.env-off .env-age-fill { background: rgba(255,255,255,.22); box-shadow: none; }

body.extreme .env-row.sel .env-lamp,
body.extreme .env-age-fill { background: var(--hot); }
