[hidden] { display: none !important; }

:root{
  --bg: #0b1220;
  --card: rgba(255,255,255,0.08);
  --card2: rgba(255,255,255,0.10);
  --text: rgba(255,255,255,0.92);
  --muted: rgba(255,255,255,0.62);
  --line: rgba(255,255,255,0.10);
  --accent: #4f8cff;
  --danger: #ff4d4d;

  --radius: 18px;
  --shadow: 0 18px 60px rgba(0,0,0,0.35);
}

*{ box-sizing: border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Display","SF Pro Text", Inter, Arial, sans-serif;
  background: radial-gradient(1200px 900px at 20% -10%, rgba(79,140,255,0.35), transparent 55%),
              radial-gradient(1000px 700px at 120% 10%, rgba(120,255,220,0.18), transparent 50%),
              var(--bg);
  color: var(--text);
}

.app{
  min-height:100%;
  padding-bottom: 88px;
}

.topbar{
  position: sticky;
  top:0;
  z-index: 10;
  padding: 14px 16px 12px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  backdrop-filter: blur(14px);
  background: linear-gradient(to bottom, rgba(11,18,32,0.92), rgba(11,18,32,0.55));
  border-bottom: 1px solid var(--line);
}

.brand{ display:flex; gap:12px; align-items:center; }
.logo{
  width:42px; height:42px;
  border-radius: 14px;
  display:grid; place-items:center;
  background: rgba(255,255,255,0.10);
  box-shadow: 0 8px 30px rgba(0,0,0,0.25);
  font-size: 20px;
}
.title{ font-weight: 900; letter-spacing: -0.02em; }
.subtitle{ color: var(--muted); font-weight: 800; font-size: 12px; margin-top: 2px; }

.content{ padding: 14px 16px 18px; display:flex; flex-direction:column; gap:12px; }

.card{
  background: linear-gradient(180deg, var(--card), rgba(255,255,255,0.06));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
}

.card h2{ margin:0 0 10px; font-size: 16px; letter-spacing:-0.01em; }
.muted{ color: var(--muted); font-weight: 800; }
.small{ font-size: 12px; }

.cardhead{
  display:flex; align-items:center; justify-content:space-between;
  margin-bottom: 10px;
}

.pill{
  display:inline-flex; align-items:center; gap:6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.06);
  font-weight: 900;
  font-size: 12px;
  color: var(--muted);
}
.pill-ok{ color: rgba(140,255,210,0.95); }
.pill-bad{ color: rgba(255,140,140,0.95); }

.field{ display:flex; flex-direction:column; gap:8px; }
.field span{ font-weight: 900; color: var(--muted); font-size: 12px; }
.field input{
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 12px 12px;
  border-radius: 14px;
  outline: none;
  font-weight: 900;
}
.field input::placeholder{ color: rgba(255,255,255,0.35); }

.row{ display:flex; gap:10px; align-items:center; flex-wrap:wrap; }

.btn{
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 14px;
  text-decoration:none;
  font-weight: 900;
  cursor:pointer;
}
.btn.primary{
  background: linear-gradient(180deg, rgba(79,140,255,0.95), rgba(79,140,255,0.70));
  border-color: rgba(79,140,255,0.25);
}
.btn.ghost{
  background: rgba(255,255,255,0.04);
}
.btn.danger{
  background: rgba(255,77,77,0.14);
  border-color: rgba(255,77,77,0.20);
  color: rgba(255,190,190,0.95);
}

.iconbtn{
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  width: 40px; height: 40px;
  border-radius: 14px;
  display:grid; place-items:center;
  cursor:pointer;
  text-decoration:none;
  font-weight: 900;
}

.kpis{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.kpi{
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
}
.kpiLabel{ color: var(--muted); font-weight: 900; font-size: 12px; }
.kpiValue{ font-weight: 950; font-size: 20px; margin-top: 6px; }

.pod{
  display:flex;
  gap: 12px;
  text-decoration:none;
  color: var(--text);
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow:hidden;
}
.pod img{
  width: 120px;
  height: 92px;
  object-fit: cover;
  background: rgba(255,255,255,0.04);
}
.podBody{ padding: 10px 10px 10px 0; display:flex; flex-direction:column; justify-content:center; gap: 4px; }
.podTail{ font-weight: 950; font-size: 18px; letter-spacing:-0.02em; }
.podMeta{ color: var(--muted); font-weight: 900; font-size: 12px; }
.podCta{ margin-top: 6px; color: rgba(160,200,255,0.95); font-weight: 950; font-size: 12px; }

.hint{
  margin-top: 10px;
  color: rgba(255,255,255,0.55);
  font-weight: 800;
  font-size: 12px;
}

.tabbar{
  position: fixed;
  left:0; right:0; bottom:0;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  display:flex; gap: 10px;
  justify-content:center;
  background: linear-gradient(to top, rgba(11,18,32,0.92), rgba(11,18,32,0.55));
  border-top: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.tab{
  flex:1;
  max-width: 220px;
  display:flex;
  gap: 8px;
  align-items:center;
  justify-content:center;
  padding: 12px 12px;
  border-radius: 16px;
  text-decoration:none;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.06);
  color: var(--muted);
  font-weight: 950;
}
.tab.is-active{
  background: rgba(79,140,255,0.16);
  border-color: rgba(79,140,255,0.20);
  color: rgba(190,220,255,0.95);
}

.list{ display:flex; flex-direction:column; gap:10px; }

.rowitem{
  display:flex;
  gap: 12px;
  align-items:center;
  text-decoration:none;
  color: var(--text);
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow:hidden;
}
.rowimg{
  width: 64px;
  height: 64px;
  object-fit: cover;
  background: rgba(255,255,255,0.04);
}
.rowbody{ padding: 10px 12px 10px 0; flex:1; }
.rowtop{ display:flex; justify-content:space-between; gap: 10px; }
.rowtail{ font-weight: 950; letter-spacing:-0.02em; }
.rowdate{ color: var(--muted); font-weight: 900; font-size: 12px; }
.rowmeta{ color: var(--muted); font-weight: 900; font-size: 12px; margin-top: 2px; }

/* modal */
.modal{
  position: fixed; inset:0;
  background: rgba(0,0,0,0.55);
  display:flex;
  align-items:flex-end;
  padding: 14px;
  z-index: 999;
}
.sheet{
  width:100%;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(15,23,42,0.92);
  backdrop-filter: blur(18px);
  box-shadow: 0 40px 120px rgba(0,0,0,0.6);
  overflow:hidden;
}
.sheetHead{
  padding: 14px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sheet{ pointer-events: auto; }
.modal{ pointer-events: auto; }
																																								  
																																								  
.sheetTitle{ font-weight: 950; }
.sheetBody{ padding: 14px; display:flex; flex-direction:column; gap: 10px; }
																																								  
/* --- Guess the Tail --- */
.gt-score{
  display:flex;
  gap:10px;
  margin-bottom: 12px;
}
.gt-metric{
  flex:1;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 10px 12px;
  display:flex;
  justify-content:space-between;
  align-items:baseline;
}
.gt-metric span{ color: var(--muted); font-weight: 900; font-size: 12px; }
.gt-metric b{ font-weight: 950; font-size: 18px; }

.gt-card{
  display:flex;
  gap: 12px;
  text-decoration:none;
  color: var(--text);
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow:hidden;
  margin-bottom: 10px;
}
.gt-card img{
  width: 132px;
  height: 96px;
  object-fit: cover;
  background: rgba(255,255,255,0.04);
}
.gt-meta{
  padding: 10px 10px 10px 0;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap: 4px;
}
.gt-op{ font-weight: 950; font-size: 14px; }
.gt-tag{ color: var(--muted); font-weight: 900; font-size: 12px; }

.gt-question{
  font-weight: 950;
  letter-spacing:-0.01em;
  margin: 6px 0 10px;
}

.gt-choices{
  display:grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.gt-choice{
  width:100%;
  display:flex;
  align-items:center;
  gap: 10px;
  padding: 12px 12px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  font-weight: 950;
  cursor:pointer;
  text-align:left;
}
.gt-letter{
  width: 30px; height: 30px;
  border-radius: 12px;
  display:grid; place-items:center;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--muted);
}
.gt-tail{ letter-spacing: 0.02em; }

.gt-choice.is-disabled{ opacity: 0.92; cursor: default; }
.gt-choice.is-correct{
  border-color: rgba(140,255,210,0.28);
  background: rgba(140,255,210,0.12);
}
.gt-choice.is-wrong{
  border-color: rgba(255,140,140,0.28);
  background: rgba(255,140,140,0.10);
}

.gt-feedback{
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.06);
  font-weight: 900;
}
.gt-feedback.is-ok{
  border-color: rgba(140,255,210,0.28);
  background: rgba(140,255,210,0.12);
}
.gt-feedback.is-bad{
  border-color: rgba(255,140,140,0.28);
  background: rgba(255,140,140,0.10);
}
																																																					.recentRow{
  display:flex;
  gap:10px;
  align-items:center;
  text-decoration:none;
  padding:10px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,0.08);
  margin-bottom:8px;
}
.recentImg{
  width:54px;
  height:38px;
  object-fit:cover;
  border-radius:10px;
  background:rgba(255,255,255,0.06);
}
.recentMeta{ min-width:0; }
.recentTail{ font-weight:700; }
.recentSub{
  font-size:12px;
  opacity:.8;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  max-width:260px;
}

																																																					.quest{
  border:1px solid rgba(255,255,255,0.08);
  border-radius:16px;
  padding:12px;
  margin-top:10px;
}
.questTop{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start;
}
.questTitle{ font-weight:800; }
.questSub{ font-size:12px; opacity:.8; margin-top:3px; }
.questRight{ font-size:12px; opacity:.85; white-space:nowrap; }
.questBar{
  height:10px;
  border-radius:999px;
  background:rgba(255,255,255,0.08);
  overflow:hidden;
  margin-top:10px;
}
.questFill{
  height:100%;
  width:0%;
  border-radius:999px;
  background:rgba(255,255,255,0.35);
}
.questActions{ margin-top:10px; }

/* =========================
   iOS Tabbar – scrollable + slider
   ========================= */

footer.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;

  background: rgba(20,20,20,.9);
  backdrop-filter: blur(14px);
  border-top: 1px solid rgba(255,255,255,.08);
  z-index: 100;

  padding-bottom: env(safe-area-inset-bottom, 0);
}

/* scroll container */
footer.tabbar {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
footer.tabbar::-webkit-scrollbar { display: none; }

/* make tabs not shrink */
footer.tabbar .tab {
  flex: 0 0 auto;
  min-width: 82px;          /* important: prevents squish */
  height: 56px;
  padding: 0 10px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;

  color: rgba(255,255,255,.6);
  text-decoration: none;
  font-size: 11px;
  position: relative;
}

footer.tabbar .tabIcon {
  font-size: 20px;
  line-height: 1;
  display: inline-block;
  transform-origin: center;
}

footer.tabbar .tabLabel {
  font-size: 10px;
  letter-spacing: .2px;
  opacity: .85;
}

footer.tabbar .tab.is-active {
  color: #1e88ff;
}

/* underline slider (per active tab) */
footer.tabbar .tab::after {
  content: "";
  position: absolute;
  bottom: 6px;
  left: 18px;
  right: 18px;
  height: 3px;
  border-radius: 999px;
  background: transparent;
  transition: background .2s ease, transform .25s ease;
}

footer.tabbar .tab.is-active::after {
  background: rgba(30,136,255,.95);
}

/* tap feedback */
footer.tabbar .tab:active {
  opacity: .75;
}

/* keep content above tabbar */
body {
  padding-bottom: calc(56px + env(safe-area-inset-bottom, 0));
}
																																																					
																																																					@keyframes tabBounce {
  0%   { transform: translateY(0) scale(1); }
  35%  { transform: translateY(-3px) scale(1.12); }
  70%  { transform: translateY(0) scale(.98); }
  100% { transform: translateY(0) scale(1); }
}

footer.tabbar .tab.is-bounce .tabIcon {
  animation: tabBounce .35s cubic-bezier(.2, 1.2, .25, 1) 1;
}

																																																			
/* Coachmark */
.ttcoach{
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 12px;
  padding-bottom: calc(70px + env(safe-area-inset-bottom, 0));
}

.ttcoach-card{
  width: min(520px, 100%);
  background: rgba(18,18,18,.92);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 18px;
  padding: 14px;
  box-shadow: 0 18px 40px rgba(0,0,0,.6);
}

.ttcoach-title{
  font-weight: 700;
  font-size: 15px;
}

.ttcoach-text{
  margin-top: 6px;
  font-size: 13px;
  opacity: .9;
  line-height: 1.35;
}

.ttcoach-btn{
  margin-top: 12px;
  width: 100%;
  border: none;
  border-radius: 14px;
  padding: 12px;
  font-weight: 700;
  background: #1e88ff;
  color: #fff;
  cursor: pointer;
}

