/* ============================================================
   YourIQ.AI / OneCharacterCode — UNIVERSAL CARTRIDGE CORE
   File:    styles.css
   Created: 2026-06-18
   Rules:   Vanilla CSS only. System fonts only (no external fonts).
            No CDN. Mobile-first. Body text >= 16px. No 13px text.
            Tap targets >= 44px.
   ============================================================ */

:root {
  /* Palette — "cartridge slot": deep slate shell, warm amber contact pin */
  --bg:        #0f1419;
  --bg-2:      #161d26;
  --panel:     #1b2430;
  --panel-2:   #222d3b;
  --line:      #2c3a4c;
  --ink:       #eaf0f6;
  --ink-dim:   #aebccd;
  --accent:    #ffb454;   /* amber — the "contact pin" */
  --accent-2:  #4fd6c9;   /* teal — secondary action */
  --good:      #7be08a;
  --warn:      #ff8f6b;
  --radius:    14px;
  --radius-sm: 10px;
  --pad:       16px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
          Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
          "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;          /* base body >= 16px */
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(1200px 500px at 50% -10%, rgba(255,180,84,0.10), transparent 60%),
    var(--bg);
}

.app-shell {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 18px var(--pad) 28px;
}

/* ---- Cartridge header: the signature "slot + label" element ---- */
.cart-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  margin-bottom: 18px;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}
.cart-head::before {            /* contact-pin stripe, evokes a cartridge edge */
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 6px;
  background: repeating-linear-gradient(
    180deg, var(--accent) 0 10px, #d98f33 10px 16px);
}
.cart-head__icon {
  width: 44px; height: 44px;
  flex: 0 0 auto;
  border-radius: 10px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  display: grid; place-items: center;
}
.cart-head__icon img { width: 26px; height: 26px; display: block; }
.cart-head__title { margin: 0; font-size: 19px; font-weight: 700; letter-spacing: 0.2px; }
.cart-head__sub { margin: 2px 0 0; font-size: 16px; color: var(--ink-dim); }

/* ---- Cards ---- */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 16px;
}
.card__title { margin: 0 0 6px; font-size: 20px; font-weight: 700; }
.card__lead { margin: 0 0 14px; font-size: 16px; color: var(--ink-dim); }

/* ---- Key/value list ---- */
.kv { margin: 0; }
.kv__row {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--line);
  font-size: 16px;
}
.kv__row:last-child { border-bottom: 0; }
.kv dt { color: var(--ink-dim); }
.kv dd { margin: 0; font-family: var(--mono); color: var(--ink); }

/* ---- Buttons (tap target >= 44px) ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 18px;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 600;
  color: var(--bg);
  background: var(--accent);
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn--ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn--teal  { background: var(--accent-2); color: #06231f; }
.btn:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 2px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }

/* ---- Inputs ---- */
.field { display: flex; gap: 10px; margin: 12px 0; }
.field input[type="text"] {
  flex: 1; min-height: 48px;
  padding: 12px 14px;
  font-size: 16px;
  color: var(--ink);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.field input:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 1px; }

/* ---- List items (tracker rows) ---- */
.list { list-style: none; margin: 8px 0 0; padding: 0; }
.item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px; margin-bottom: 10px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.item__main { flex: 1; min-width: 0; }
.item__name { font-size: 17px; font-weight: 600; }
.item__meta { font-size: 16px; color: var(--ink-dim); margin-top: 2px; }
.item__streak {
  font-family: var(--mono); font-size: 16px;
  padding: 6px 10px; border-radius: 999px;
  background: rgba(123,224,138,0.12); color: var(--good);
  white-space: nowrap;
}
.tap {
  min-width: 48px; min-height: 48px;
  display: grid; place-items: center;
  font-size: 22px; line-height: 1;
  background: var(--panel-2); color: var(--ink);
  border: 1px solid var(--line); border-radius: 10px;
  cursor: pointer;
}
.tap--done { background: var(--good); color: #06310f; border-color: var(--good); }
.tap:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 2px; }

/* ---- Banner / notices ---- */
.notice {
  font-size: 16px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--ink-dim);
  margin: 10px 0;
}
.notice strong { color: var(--ink); }
.badge {
  display: inline-block; font-size: 16px; font-family: var(--mono);
  padding: 4px 10px; border-radius: 999px;
  background: var(--panel-2); color: var(--accent);
  border: 1px solid var(--line);
}

/* ---- Footer standard ---- */
.cart-footer {
  margin-top: 22px;
  padding: 18px 16px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 16px;
  color: var(--ink-dim);
  display: grid;
  gap: 10px;
}
.cart-footer__brand { display: flex; gap: 10px; align-items: baseline; }
.cart-footer__brand strong { color: var(--accent); font-size: 16px; letter-spacing: 0.3px; }
.cart-footer__brand span { color: var(--accent-2); font-size: 16px; }
.cart-footer__meta, .cart-footer__notes { display: grid; gap: 4px; }
.cart-footer__meta span { font-family: var(--mono); }
.cart-footer__contact a {
  color: var(--accent-2);
  font-size: 16px;
  text-decoration: none;
  display: inline-block; min-height: 32px; line-height: 32px;
}
.cart-footer__contact a:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }

/* ---- Language toggle (EN / ES) — required built-in socket module ---- */
.lang-toggle {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  padding: 8px 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.lang-toggle__label {
  font-size: 16px;
  color: var(--ink-dim);
  margin-right: 2px;
}
.lang-btn {
  min-height: 44px;
  min-width: 64px;
  padding: 8px 16px;
  font-size: 16px;
  font-family: var(--font);
  color: var(--ink);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
}
.lang-btn--active {
  background: var(--accent);
  color: #2a1a05;
  border-color: var(--accent);
  font-weight: 600;
}
.lang-btn:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 2px; }
.lang-btn:active { transform: translateY(1px); }

/* ---- Responsive: a little more room on larger screens ---- */
@media (min-width: 560px) {
  .cart-footer { grid-template-columns: 1fr 1fr; align-items: start; }
  .cart-footer__brand { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* Section 4 music UI - readable, mobile first */
.m-title { font-size: 22px; margin: 12px 0 4px; }
.m-sub { color: var(--ink-dim); margin-bottom: 12px; }
.track-list { display: flex; flex-direction: column; gap: 10px; }
.tcard { display: flex; align-items: center; gap: 10px; background: var(--panel); padding: 10px; border-radius: 12px; }
.tcov { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; }
.tt { flex: 1; font-size: 16px; }
.pbtn { padding: 8px 14px; border-radius: 999px; background: var(--accent); color: #111; border: 0; font-weight: 600; min-height: 40px; }
.player { background: var(--panel-2); padding: 12px; border-radius: 12px; margin: 12px 0; }
.pcov { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; margin-right: 10px; }
.player span { display: block; }
.btn { background: var(--accent); color: #111; border: 0; padding: 8px 12px; border-radius: 8px; margin: 4px; min-height: 40px; }
.small { font-size: 15px; color: var(--ink-dim); }
.note { font-size: 15px; color: var(--warn); }

.m-copy{font-size:16px;opacity:.7;margin-top:18px;text-align:center;}

