/* ─── RESET & BOX MODEL ─────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: hidden; width: 100%; }
body { overflow-x: hidden; width: 100%; }

/* ─── DESIGN TOKENS ─────────────────────────────────────────────────────────── */

:root {
  --w-bg:        #080d16;
  --w-card:      #0f172a;
  --w-card2:     #1e293b;
  --w-border:    rgba(255,255,255,0.07);
  --w-text:      #e2e8f0;
  --w-muted:     #64748b;
  --w-dim:       #334155;

  --w-accent:    #34d399;
  --w-accent2:   #22d3ee;
  --w-gradient:  linear-gradient(135deg, #065f46 0%, #0e7490 100%);
  --w-done-grad: linear-gradient(135deg, #059669 0%, #0284c7 100%);
  --w-train-bg:  rgba(52,211,153,0.1);
  --w-train-bdr: rgba(52,211,153,0.4);
}

.theme-male {
  --w-accent:    #60a5fa;
  --w-accent2:   #a78bfa;
  --w-gradient:  linear-gradient(135deg, #1e3a8a 0%, #5b21b6 100%);
  --w-done-grad: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  --w-train-bg:  rgba(96,165,250,0.1);
  --w-train-bdr: rgba(96,165,250,0.4);
}

.theme-female {
  --w-accent:    #f472b6;
  --w-accent2:   #c084fc;
  --w-gradient:  linear-gradient(135deg, #9d174d 0%, #6b21a8 100%);
  --w-done-grad: linear-gradient(135deg, #db2777 0%, #9333ea 100%);
  --w-train-bg:  rgba(244,114,182,0.1);
  --w-train-bdr: rgba(244,114,182,0.4);
}

/* ─── BASE ──────────────────────────────────────────────────────────────────── */

body {
  background: var(--w-bg);
  color: var(--w-text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ─── LOADING ───────────────────────────────────────────────────────────────── */

.w-loading {
  display: flex; align-items: center; justify-content: center;
  height: 100vh; background: var(--w-bg);
}
.w-spinner {
  width: 40px; height: 40px;
  border: 3px solid rgba(255,255,255,0.1);
  border-top-color: var(--w-accent);
  border-radius: 50%;
  animation: wspin 0.8s linear infinite;
}
@keyframes wspin { to { transform: rotate(360deg); } }

/* ─── ONBOARDING ────────────────────────────────────────────────────────────── */

#w-onboarding {
  display: flex; flex-direction: column; align-items: center;
  min-height: 100vh; width: 100%;
  padding: 0 1.25rem calc(2rem + env(safe-area-inset-bottom, 0));
  background: var(--w-gradient);
  overflow-x: hidden;
}

.ob-hero {
  width: 100%; max-width: 420px;
  text-align: center;
  padding: calc(2.5rem + env(safe-area-inset-top, 0)) 0 2rem;
  position: relative;
}
.ob-back-link {
  position: absolute; left: 0;
  top: calc(1.5rem + env(safe-area-inset-top, 0));
  color: rgba(255,255,255,0.9); text-decoration: none; font-size: 1.3rem;
  width: 2.5rem; height: 2.5rem; display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.15); border-radius: 50%;
  backdrop-filter: blur(8px);
}
.ob-hero-icon {
  font-size: 4rem; margin-bottom: 1rem;
  filter: drop-shadow(0 4px 16px rgba(0,0,0,0.4));
}
.ob-hero h1 {
  color: #fff; font-size: 2rem; font-weight: 800;
  margin: 0 0 0.5rem; letter-spacing: -0.02em;
}
.ob-hero p { color: rgba(255,255,255,0.75); font-size: 0.95rem; margin: 0; }

.ob-card {
  width: 100%; max-width: 420px;
  background: rgba(15,23,42,0.95);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 1.5rem; padding: 1.75rem;
  box-shadow: 0 32px 64px rgba(0,0,0,0.5);
  backdrop-filter: blur(20px);
  margin-bottom: 2rem;
}

.ob-progress { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1.75rem; }
.ob-dot {
  width: 2rem; height: 2rem; border-radius: 50%;
  background: rgba(255,255,255,0.08); color: var(--w-muted);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 700; transition: all 0.3s;
}
.ob-dot.active {
  background: var(--w-gradient); color: #fff;
  box-shadow: 0 0 0 3px rgba(255,255,255,0.15);
}
.ob-line { flex: 1; height: 2px; background: rgba(255,255,255,0.08); max-width: 3rem; }

.ob-step-title {
  font-size: 1.2rem; font-weight: 700; margin: 0 0 1.25rem;
  color: var(--w-text); letter-spacing: -0.01em;
}
.ob-optional { font-size: 0.72rem; font-weight: 400; color: var(--w-muted); }

.ob-nav-row { display: flex; gap: 0.75rem; margin-top: 1.25rem; }
.ob-nav-row .btn-primary, .ob-nav-row .btn-secondary { flex: 1; }
.ob-btn { width: 100%; margin-top: 1.25rem; }

/* Gender cards */
.gender-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.25rem; }
.gender-card {
  border: 2px solid rgba(255,255,255,0.1); border-radius: 1.25rem;
  padding: 2rem 1rem; text-align: center; cursor: pointer;
  background: rgba(255,255,255,0.04); transition: all 0.2s;
}
.gender-card:hover { border-color: var(--w-accent); background: var(--w-train-bg); }
.gender-card.selected {
  border-color: var(--w-accent); background: var(--w-train-bg);
  box-shadow: 0 0 0 3px var(--w-train-bdr);
}
.gender-card.male.selected  { border-color: #60a5fa; background: rgba(96,165,250,0.1); box-shadow: 0 0 0 3px rgba(96,165,250,0.2); }
.gender-card.female.selected { border-color: #f472b6; background: rgba(244,114,182,0.1); box-shadow: 0 0 0 3px rgba(244,114,182,0.2); }
.gc-symbol { font-size: 2.5rem; margin-bottom: 0.5rem; line-height: 1; }
.gc-label  { font-weight: 700; font-size: 1rem; color: var(--w-text); }

/* Frequency */
.freq-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.5rem; margin-bottom: 1.25rem; }
.freq-btn {
  padding: 0.85rem 0; border: 2px solid rgba(255,255,255,0.1);
  border-radius: 0.875rem; background: rgba(255,255,255,0.04);
  font-size: 1.1rem; font-weight: 700; color: var(--w-text);
  cursor: pointer; transition: all 0.15s; text-align: center;
}
.freq-btn.selected {
  border-color: var(--w-accent); background: var(--w-train-bg);
  color: var(--w-accent); box-shadow: 0 0 0 3px var(--w-train-bdr);
}

/* ─── HEADER ────────────────────────────────────────────────────────────────── */

.w-header {
  display: flex; align-items: center; gap: 0.75rem;
  background: var(--w-gradient);
  padding: calc(0.85rem + env(safe-area-inset-top, 0)) 1rem 0.85rem;
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}
.w-back {
  color: rgba(255,255,255,0.9); text-decoration: none; font-size: 1.1rem;
  width: 2.25rem; height: 2.25rem;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.15); border-radius: 50%; flex-shrink: 0;
}
.w-title { flex: 1; font-size: 1.1rem; font-weight: 700; color: #fff; }
.w-reset-btn {
  background: rgba(255,255,255,0.15); border: none; color: #fff;
  width: 2.25rem; height: 2.25rem; border-radius: 50%;
  font-size: 1rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}

/* ─── VIEW HERO ─────────────────────────────────────────────────────────────── */

.view-hero {
  background: var(--w-gradient);
  padding: 1rem 1.25rem 1.5rem;
  position: relative;
}
.view-hero::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 1.5rem;
  background: var(--w-bg);
  border-radius: 1.25rem 1.25rem 0 0;
}

.vh-nav {
  display: flex; align-items: center; gap: 0.75rem; justify-content: space-between;
}
.vh-static { display: flex; flex-direction: column; gap: 0.25rem; }

.vh-center { flex: 1; text-align: center; }
.vh-title  { display: block; font-size: 1rem; font-weight: 700; color: #fff; }
.vh-sub    { display: block; font-size: 0.78rem; color: rgba(255,255,255,0.65); margin-top: 0.15rem; }

.period-arrow {
  background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.2);
  border-radius: 0.6rem; width: 2.25rem; height: 2.25rem;
  font-size: 1.2rem; cursor: pointer; color: #fff;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}

/* ─── MAIN & VIEWS ──────────────────────────────────────────────────────────── */

.w-main {
  padding-bottom: calc(5rem + env(safe-area-inset-bottom, 0));
}
.w-view { display: none; }
.w-view.active { display: block; }

/* ─── BOTTOM NAV ────────────────────────────────────────────────────────────── */

.w-bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  display: flex;
  background: #0f172a;
  border-top: 1px solid rgba(255,255,255,0.07);
  padding-bottom: env(safe-area-inset-bottom, 0);
  box-shadow: 0 -8px 32px rgba(0,0,0,0.5);
}
.w-bnav {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 0.2rem;
  padding: 0.65rem 0; border: none; background: none;
  color: var(--w-muted); cursor: pointer; transition: color 0.2s;
  -webkit-tap-highlight-color: transparent; position: relative;
}
.w-bnav::before {
  content: '';
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 0; height: 2px;
  background: linear-gradient(90deg, var(--w-accent), var(--w-accent2));
  border-radius: 0 0 2px 2px;
  transition: width 0.25s cubic-bezier(0.4,0,0.2,1);
}
.w-bnav.active::before { width: 2rem; }
.w-bnav.active { color: var(--w-accent); }
.w-bnav-icon  { font-size: 1.3rem; line-height: 1; }
.w-bnav-label { font-size: 0.6rem; font-weight: 600; letter-spacing: 0.02em; }

/* ─── VIIKKONÄKYMÄ ──────────────────────────────────────────────────────────── */

.week-grid {
  display: grid; grid-template-columns: repeat(7, 1fr);
  padding: 1rem 0.75rem 0.5rem; gap: 0.4rem;
}
.wc {
  border-radius: 0.875rem; padding: 0.65rem 0.1rem;
  text-align: center; cursor: pointer;
  background: var(--w-card); border: 1.5px solid var(--w-border);
  transition: all 0.2s; position: relative; overflow: hidden;
}
.wc.rest   { opacity: 0.5; }
.wc.future { opacity: 0.35; cursor: default; }
.wc.today:not(.done) {
  border-color: var(--w-accent);
  box-shadow: 0 0 0 2px var(--w-train-bdr), inset 0 0 0 1px var(--w-accent);
}
.wc.training:not(.done) {
  background: var(--w-train-bg);
  border-color: var(--w-train-bdr);
}
.wc.done {
  background: var(--w-done-grad); border-color: transparent;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}
.wc.done .wc-dow, .wc.done .wc-date, .wc.done .wc-name { color: rgba(255,255,255,0.9); }

.wc-dow  { font-size: 0.6rem; font-weight: 700; color: var(--w-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.wc-date { font-size: 1.05rem; font-weight: 800; line-height: 1.2; color: var(--w-text); }
.wc-name { font-size: 0.55rem; color: var(--w-muted); margin-top: 0.2rem;
           white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 0.15rem; }
.wc-check {
  position: absolute; top: 0.2rem; right: 0.25rem;
  font-size: 0.65rem; color: rgba(255,255,255,0.9);
}

.w-legend {
  display: flex; gap: 1.25rem; padding: 0.5rem 0.75rem 0.75rem;
  justify-content: center;
}
.leg-item { display: flex; align-items: center; gap: 0.4rem; font-size: 0.75rem; color: var(--w-muted); }
.leg-dot  { width: 8px; height: 8px; border-radius: 50%; }
.leg-dot.training { background: var(--w-accent); }
.leg-dot.done     { background: linear-gradient(135deg, var(--w-accent), var(--w-accent2)); }
.leg-dot.rest     { background: var(--w-dim); }

/* ─── KALENTERINÄKYMÄ ───────────────────────────────────────────────────────── */

.w-cal-weekdays {
  display: grid; grid-template-columns: repeat(7, 1fr);
  padding: 1rem 0.75rem 0.3rem; text-align: center;
}
.w-cal-weekdays span { font-size: 0.7rem; font-weight: 700; color: var(--w-muted); text-transform: uppercase; }

.w-cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr);
  padding: 0.25rem 0.75rem; gap: 0.25rem;
}
.wcc {
  aspect-ratio: 1; border-radius: 0.625rem;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  position: relative; cursor: pointer;
  font-size: 0.85rem; font-weight: 600; color: var(--w-text);
  transition: all 0.15s;
}
.wcc.empty  { cursor: default; }
.wcc.today  { background: var(--w-train-bg); border: 1.5px solid var(--w-accent); color: var(--w-accent); }
.wcc.training { background: rgba(255,255,255,0.05); }
.wcc.done   { background: var(--w-done-grad); color: #fff; }
.wcc.future { opacity: 0.3; cursor: default; }
.wcc-num    { font-size: 0.85rem; line-height: 1; }
.wcc-dot    { position: absolute; bottom: 0.15rem; }
.wcc-dot.planned { width: 4px; height: 4px; border-radius: 50%; background: var(--w-accent); }
.wcc-dot.done    { font-size: 0.6rem; color: rgba(255,255,255,0.9); }

/* ─── PÄIVÄNÄKYMÄ ───────────────────────────────────────────────────────────── */

.day-content { padding: 0.75rem; }

.day-header {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 1rem;
}
.day-header h2 {
  margin: 0; font-size: 1.25rem; font-weight: 800;
  letter-spacing: -0.02em; color: var(--w-text);
}
.day-count {
  font-size: 0.78rem; color: var(--w-muted);
  background: var(--w-card2); padding: 0.2rem 0.6rem;
  border-radius: 2rem; border: 1px solid var(--w-border);
}

.ex-list { display: flex; flex-direction: column; gap: 0.6rem; margin-bottom: 1rem; }
.ex-card {
  background: var(--w-card); border-radius: 1rem;
  padding: 1rem 1rem 1rem 1.25rem;
  border: 1px solid var(--w-border);
  border-left: 3px solid var(--w-accent);
  display: flex; align-items: center; justify-content: space-between;
}
.ex-info { flex: 1; }
.ex-name   { font-weight: 700; font-size: 0.95rem; color: var(--w-text); margin-bottom: 0.25rem; }
.ex-detail { font-size: 0.85rem; color: var(--w-text); opacity: 0.8; }
.ex-meta   { font-size: 0.75rem; color: var(--w-muted); margin-top: 0.2rem; }
.ex-badge  {
  background: var(--w-train-bg); border: 1px solid var(--w-train-bdr);
  border-radius: 0.5rem; padding: 0.25rem 0.6rem;
  font-size: 0.78rem; font-weight: 700; color: var(--w-accent);
  white-space: nowrap; margin-left: 0.75rem; flex-shrink: 0;
}

.log-btn {
  width: 100%; padding: 1rem; border-radius: 1rem;
  border: 1.5px solid var(--w-accent); background: transparent;
  color: var(--w-accent); font-size: 1rem; font-weight: 700;
  cursor: pointer; transition: all 0.2s;
  letter-spacing: 0.01em;
}
.log-btn:hover { background: var(--w-train-bg); }
.log-btn.done {
  background: var(--w-done-grad); border-color: transparent;
  color: #fff; box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.rest-card {
  text-align: center; padding: 3.5rem 1.5rem;
  background: var(--w-card); border-radius: 1.25rem;
  border: 1px solid var(--w-border);
}
.rest-icon  { font-size: 3.5rem; margin-bottom: 1rem; }
.rest-card h3 { margin: 0 0 0.5rem; font-size: 1.2rem; font-weight: 700; color: var(--w-text); }
.rest-card p  { color: var(--w-muted); margin: 0; font-size: 0.9rem; line-height: 1.6; }

/* ─── OHJELMA-EDITORI ───────────────────────────────────────────────────────── */

.prog-days { display: flex; flex-direction: column; gap: 0.75rem; padding: 0.75rem; }

.prog-day {
  background: var(--w-card); border-radius: 1.25rem;
  border: 1px solid var(--w-border);
  overflow: hidden;
}
.prog-day-hdr {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.875rem 1rem;
  background: linear-gradient(135deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  border-bottom: 1px solid var(--w-border); cursor: pointer;
}
.prog-day-hdr strong { color: var(--w-text); font-size: 0.95rem; }
.prog-day-hdr span:last-child { color: var(--w-muted); font-size: 0.85rem; }
.day-tag {
  display: inline-block;
  background: var(--w-gradient); color: #fff;
  font-size: 0.68rem; font-weight: 700;
  padding: 0.15rem 0.55rem; border-radius: 0.4rem; margin-right: 0.6rem;
}

.prog-exs { padding: 0.5rem; }
.prog-ex {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.65rem 0.625rem; border-radius: 0.625rem; cursor: pointer;
  transition: background 0.15s;
}
.prog-ex:hover { background: rgba(255,255,255,0.04); }
.prog-ex-name   { font-size: 0.9rem; font-weight: 600; color: var(--w-text); }
.prog-ex-detail { font-size: 0.75rem; color: var(--w-muted); margin-top: 0.1rem; }
.prog-ex span:last-child { color: var(--w-muted); font-size: 0.8rem; }

.add-ex-btn {
  width: 100%; padding: 0.65rem; margin-top: 0.25rem;
  border: 1.5px dashed rgba(255,255,255,0.15); border-radius: 0.625rem;
  background: none; color: var(--w-muted); font-size: 0.85rem; cursor: pointer;
  transition: all 0.15s;
}
.add-ex-btn:hover { border-color: var(--w-accent); color: var(--w-accent); }

/* ─── LIIKE-HAKU MODAL ──────────────────────────────────────────────────────── */

.search-input {
  width: 100%; padding: 0.65rem 0.875rem; border-radius: 0.75rem;
  border: 1.5px solid var(--w-border, #e2e8f0);
  background: transparent; font-size: 0.9rem;
  outline: none; transition: border-color 0.15s;
}
.search-input:focus { border-color: var(--w-accent); }

.group-tabs { display: flex; flex-wrap: wrap; gap: 0.35rem; padding: 0.5rem 0 0.75rem; }
.gtab {
  padding: 0.3rem 0.75rem; border-radius: 2rem; font-size: 0.78rem;
  border: 1.5px solid #e2e8f0; background: #f8fafc; cursor: pointer;
  transition: all 0.15s; color: #475569;
}
.gtab.active { background: var(--w-accent, #16a34a); border-color: var(--w-accent, #16a34a); color: #fff; }

.add-ex-list { max-height: 38vh; overflow-y: auto; }
.add-ex-item {
  padding: 0.75rem 0.25rem; border-bottom: 1px solid #f1f5f9;
  cursor: pointer; transition: background 0.1s;
}
.add-ex-item:hover { background: #f8fafc; }
.add-ex-name { font-size: 0.9rem; font-weight: 600; color: #1e293b; }
.add-ex-meta { font-size: 0.75rem; color: #94a3b8; margin-top: 0.1rem; }

.custom-ex-section { margin-top: 0.75rem; border-top: 1px solid #f1f5f9; padding-top: 0.75rem; }
.custom-ex-toggle {
  display: flex; justify-content: space-between; align-items: center;
  cursor: pointer; padding: 0.4rem 0;
  color: var(--w-accent, #16a34a); font-size: 0.9rem; font-weight: 600;
}
#custom-ex-arrow { font-size: 1rem; }

/* Modal tall */
.modal-tall { max-height: 92vh; overflow-y: auto; }

/* ─── VINKIT ────────────────────────────────────────────────────────────────── */

.tips-container {
  display: flex; flex-direction: column; gap: 0.75rem; padding: 0.75rem;
}
.tip-card {
  background: var(--w-card); border-radius: 1.25rem;
  border: 1px solid var(--w-border);
  padding: 1.25rem 1.1rem; display: flex; gap: 1rem;
  align-items: flex-start; transition: transform 0.2s;
}
.tip-card:active { transform: scale(0.98); }
.tip-icon-wrap {
  width: 3rem; height: 3rem; border-radius: 0.875rem; flex-shrink: 0;
  background: var(--w-done-grad);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.tip-body  { flex: 1; min-width: 0; }
.tip-title { margin: 0 0 0.4rem; font-size: 0.95rem; font-weight: 700; color: var(--w-text); }
.tip-text  { margin: 0; font-size: 0.84rem; color: var(--w-muted); line-height: 1.6; }
.tip-text strong { color: var(--w-text); }

/* ─── IMPORT MODAL ──────────────────────────────────────────────────────────── */

.vh-import-row {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
}

.import-trigger-btn {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff; border-radius: 0.75rem;
  padding: 0.45rem 0.9rem; font-size: 0.8rem; font-weight: 600;
  cursor: pointer; white-space: nowrap; transition: all 0.15s;
  flex-shrink: 0;
}
.import-trigger-btn:hover { background: rgba(255,255,255,0.25); }

.modal-import { max-height: 90vh; overflow-y: auto; }

.import-hint {
  font-size: 0.85rem; color: #64748b;
  margin: 0 0 0.75rem; line-height: 1.5;
}

.import-guide {
  background: #f0fdf4; border: 1px solid #bbf7d0;
  border-radius: 0.875rem; padding: 0.875rem;
  margin-bottom: 0.875rem; display: flex; flex-direction: column; gap: 0.5rem;
}
.import-guide-step {
  display: flex; align-items: flex-start; gap: 0.6rem;
  font-size: 0.83rem; color: #374151; line-height: 1.4;
}
.import-guide-step em { font-style: normal; font-weight: 600; color: #15803d; }
.import-guide-num {
  background: #16a34a; color: #fff;
  width: 1.3rem; height: 1.3rem; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; font-weight: 700; flex-shrink: 0; margin-top: 0.05rem;
}
.import-copy-template-btn {
  margin-top: 0.25rem; padding: 0.55rem 1rem;
  background: #fff; border: 1.5px solid #16a34a;
  border-radius: 0.625rem; color: #15803d;
  font-size: 0.82rem; font-weight: 600; cursor: pointer;
  transition: all 0.2s; align-self: flex-start;
}
.import-copy-template-btn:hover { background: #f0fdf4; }

.import-textarea {
  width: 100%; min-height: 200px; max-height: 40vh;
  padding: 0.75rem; border-radius: 0.75rem;
  border: 1.5px solid #e2e8f0; background: #f8fafc;
  font-family: 'SF Mono', 'Fira Code', 'Courier New', monospace;
  font-size: 0.78rem; line-height: 1.6; color: #1e293b;
  resize: vertical; outline: none; transition: border-color 0.15s;
}
.import-textarea:focus { border-color: var(--w-accent, #16a34a); }

.import-btn-row {
  display: flex; gap: 0.75rem; margin-top: 0.75rem;
}
.import-btn-row .btn-primary,
.import-btn-row .btn-secondary { flex: 1; }

.import-prog-name {
  font-size: 1rem; font-weight: 700; color: #1e293b;
  margin-bottom: 0.75rem; padding-bottom: 0.5rem;
  border-bottom: 1px solid #f1f5f9;
}

.import-days { display: flex; flex-direction: column; gap: 0.6rem; margin-bottom: 0.75rem; }

.import-ex-count {
  font-size: 0.75rem; color: #94a3b8;
  background: #f1f5f9; padding: 0.15rem 0.5rem; border-radius: 1rem;
}

.import-replace-label {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.85rem; color: #475569; cursor: pointer;
  padding: 0.75rem; background: #fef9c3; border-radius: 0.625rem;
  border: 1px solid #fde68a;
}
.import-replace-label input[type="checkbox"] {
  width: 1rem; height: 1rem; accent-color: #16a34a; cursor: pointer;
}

/* ─── TOAST ─────────────────────────────────────────────────────────────────── */

.w-toast {
  position: fixed;
  bottom: calc(5.5rem + env(safe-area-inset-bottom, 0));
  left: 50%; transform: translateX(-50%) translateY(0.75rem);
  background: rgba(15,23,42,0.95); color: #fff;
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 0.7rem 1.25rem; border-radius: 2rem;
  font-size: 0.88rem; opacity: 0;
  transition: all 0.25s; z-index: 9999;
  white-space: nowrap; pointer-events: none;
}
.w-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ─── RESPONSIIVISUUS ───────────────────────────────────────────────────────── */

@media (min-width: 600px) {
  .ob-card   { padding: 2.25rem; }
  .week-grid { gap: 0.6rem; padding: 1.25rem 1rem 0.75rem; }
  .wc-name   { font-size: 0.65rem; }
  .prog-days { display: grid; grid-template-columns: 1fr 1fr; }
  .tips-container { display: grid; grid-template-columns: 1fr 1fr; }
}
