/* Home dashboard. Content blocks are scoped under .dh and use the app's
   current palette (white cards on the textured bg, app blues + orange) so the
   markup can move into a future app shell unchanged. */
.dh{
  --orange:#e6772c; --orange2:#d76a23; --blue:#337ab7; --blue2:#2a6496;
  --card:#fff; --border:#dddddc; --text:#231f20; --muted:#6a7180; --line:#e6e8ec;
  color:var(--text);
  max-width:1240px; float:none; margin-left:auto; margin-right:auto;
}
.dh, .dh *{ box-sizing:border-box; }
.dh .ic{ width:20px; height:20px; display:inline-block; stroke:currentColor; stroke-width:2;
  stroke-linecap:round; stroke-linejoin:round; fill:none; flex:0 0 auto; }
.dh .ic.fill{ fill:currentColor; stroke:none; }

/* ---- greeting row ---- */
.dh-greet{ display:flex; align-items:flex-end; gap:16px; margin:4px 0 20px; }
.dh-greet-l{ flex:1; min-width:0; }
.dh-hello{ font-size:26px; font-weight:700; letter-spacing:-.01em; color:#231f20; }
.dh-date{ font-size:14px; color:var(--muted); margin-top:3px; }
.dh-greet-r{ display:flex; gap:10px; flex:0 0 auto; }

.dh-btn{ font:inherit; font-size:14px; font-weight:600; cursor:pointer; display:inline-flex;
  align-items:center; gap:7px; border-radius:8px; padding:10px 16px; border:1px solid transparent;
  transition:.12s; white-space:nowrap; text-decoration:none; }
.dh-btn:hover{ text-decoration:none; }
.dh-btn .ic{ width:16px; height:16px; }
.dh-btn-orange{ background:var(--orange); color:#fff; box-shadow:0 1px 3px rgba(230,119,44,.35); }
.dh-btn-orange:hover{ background:var(--orange2); color:#fff; }
.dh-btn-outline{ background:#fff; color:var(--text); border-color:#cfd6e1; }
.dh-btn-outline:hover{ border-color:#aeb8c7; background:#f7f9fc; color:var(--text); }
.dh-btn-blue{ background:var(--blue); color:#fff; }
.dh-btn-blue:hover{ background:var(--blue2); color:#fff; }

/* ---- section head ---- */
.dh-sec-head{ display:flex; align-items:baseline; gap:10px; margin:26px 2px 12px; }
.dh-sec-head h3{ margin:0; font-size:18px; font-weight:700; color:#231f20; }
.dh-sec-head .cnt{ font-size:12.5px; color:var(--muted); }
.dh-sec-head .seeall{ margin-left:auto; font-size:13px; color:var(--blue); font-weight:600;
  cursor:pointer; display:inline-flex; align-items:center; gap:3px; text-decoration:none; }
.dh-sec-head .seeall:hover{ text-decoration:none; color:var(--blue2); }
.dh-sec-head .seeall .ic{ width:14px; height:14px; transition:transform .15s; }
.dh-sec-head .seeall.dh-seeall-up .ic{ transform:rotate(-90deg); }

/* ---- Continue card (the hero) ---- */
.dh-continue{ display:flex; gap:0; background:var(--card); border:1px solid var(--border);
  border-radius:12px; overflow:hidden; box-shadow:0 2px 10px rgba(20,30,60,.07); position:relative;
  cursor:pointer; transition:box-shadow .13s, border-color .13s; }
.dh-continue:hover{ border-color:#c2ccdb; box-shadow:0 4px 16px rgba(20,30,60,.11); }
.dh-continue::before{ content:""; position:absolute; left:0; top:0; bottom:0; width:5px;
  background:linear-gradient(180deg,var(--orange),#f0a05a); z-index:2; }
.dh-cont-thumb{ flex:0 0 auto; width:300px; aspect-ratio:395/300; position:relative;
  background:#c8823c; border-right:1px solid var(--border); overflow:hidden; }
.dh-cont-thumb img{ width:100%; height:100%; object-fit:cover; display:block; }
.dh-cont-thumb .frtag{ position:absolute; left:9px; bottom:9px; z-index:4; background:rgba(35,42,59,.86);
  color:#fff; font-size:11px; font-weight:600; padding:3px 9px; border-radius:20px;
  display:flex; align-items:center; gap:5px; }
.dh-cont-thumb .frtag .ic{ width:12px; height:12px; stroke:#fff; }

/* CSS court placeholder (used when a frame can't be rendered) */
.dh-court-ph{ width:100%; height:100%; position:relative;
  background:linear-gradient(150deg,#d79a5b,#c17c37); }
.dh-court-ph::before{ content:""; position:absolute; inset:12%; border:2px solid rgba(255,255,255,.5);
  border-radius:3px; }
.dh-court-ph::after{ content:""; position:absolute; left:50%; top:12%; bottom:12%; width:2px;
  margin-left:-1px; background:rgba(255,255,255,.5); }

.dh-cont-body{ flex:1; min-width:0; padding:20px 22px; display:flex; flex-direction:column; }
.dh-eyebrow{ display:inline-flex; align-items:center; gap:7px; font-size:11.5px; font-weight:700;
  text-transform:uppercase; letter-spacing:.04em; color:var(--orange); white-space:nowrap; }
.dh-eyebrow .ic{ width:15px; height:15px; stroke:var(--orange); }
.dh-cont-name{ font-size:23px; font-weight:700; letter-spacing:-.01em; margin:9px 0 6px; color:#231f20; }
.dh-cont-meta{ font-size:13.5px; color:var(--muted); display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.dh-badge{ font-size:11px; font-weight:700; padding:2px 9px; border-radius:20px; letter-spacing:.02em; }
.dh-badge.play{ background:#e9f0f9; color:#26507e; border:1px solid #d5e2f2; }
.dh-badge.drill{ background:#fdf0e6; color:#b25a1e; border:1px solid #f4d6ba; }
.dh-cont-actions{ margin-top:auto; padding-top:18px; display:flex; align-items:center; gap:14px; }
.dh-cont-actions .dh-btn{ font-size:14.5px; padding:11px 20px; }

/* ---- Recent strip ---- */
.dh-recent{ display:grid; gap:14px; grid-template-columns:repeat(5,1fr); }
/* Collapsed: one row of 5. The extras (6..15) are rendered but hidden until
   "See all" adds .dh-recent-expanded, which flows them into rows 2-3. */
.dh-recent .dh-rextra{ display:none; }
.dh-recent.dh-recent-expanded .dh-rextra{ display:block; }
.dh-rcard{ background:var(--card); border:1px solid var(--border); border-radius:10px; overflow:hidden;
  cursor:pointer; transition:.13s; text-decoration:none; color:var(--text); display:block; }
.dh-rcard:hover{ border-color:#c2ccdb; box-shadow:0 4px 12px rgba(20,30,60,.10); transform:translateY(-2px);
  text-decoration:none; color:var(--text); }
.dh-rthumb{ position:relative; aspect-ratio:395/300; background:#c8823c; overflow:hidden; }
.dh-rthumb img{ width:100%; height:100%; object-fit:cover; display:block; }
.dh-rthumb .dh-badge{ position:absolute; right:7px; top:7px; box-shadow:0 1px 3px rgba(0,0,0,.15); }
.dh-rmeta{ padding:9px 11px 11px; }
.dh-rname{ font-size:13.5px; font-weight:600; line-height:1.3; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.dh-rsub{ font-size:11.5px; color:var(--muted); margin-top:3px; }

/* ---- Favorite folders ---- */
.dh-folders{ display:grid; gap:14px; grid-template-columns:repeat(auto-fill, minmax(220px, 1fr)); }
.dh-folder{ display:flex; align-items:center; gap:13px; min-width:0; background:var(--card);
  border:1px solid var(--border); border-radius:10px; padding:15px 16px; cursor:pointer;
  transition:.13s; text-decoration:none; color:var(--text); }
.dh-folder:hover{ border-color:#c2ccdb; box-shadow:0 3px 10px rgba(20,30,60,.08); text-decoration:none; color:var(--text); }
.dh-folder-ic{ width:42px; height:42px; flex:0 0 auto; border-radius:9px; display:flex; align-items:center;
  justify-content:center; background:#eef2f8; color:var(--blue); }
.dh-folder-ic .ic{ width:22px; height:22px; }
.dh-folder-ic.c2{ background:#fdf0e6; color:var(--orange); }
.dh-folder-ic.c3{ background:#eaf5ee; color:#3f8a5b; }
.dh-folder-tx{ min-width:0; display:flex; flex-direction:column; }
.dh-folder-name{ font-size:14px; font-weight:700; overflow:hidden; display:-webkit-box;
  -webkit-line-clamp:2; -webkit-box-orient:vertical; }
.dh-folder-count{ font-size:12px; color:var(--muted); margin-top:2px;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.dh-folder.newf{ border-style:dashed; border-color:#c2ccdb; color:var(--muted); justify-content:center; background:#fafbfd; }
.dh-folder.newf:hover{ color:var(--blue); border-color:var(--blue); background:#f2f7fd; }
.dh-folder.newf .dh-folder-ic{ background:transparent; width:auto; height:auto; }
.dh-folder.newf .newlabel{ font-size:14px; font-weight:600; }

/* ---- Tips card ---- */
.dh-tips{ display:flex; align-items:center; gap:15px; background:linear-gradient(100deg,#f0f5fb,#eef2f9);
  border:1px solid #d9e3f0; border-radius:11px; padding:15px 16px 15px 18px; margin-top:26px; position:relative; }
.dh-tips.hidden{ display:none; }
.dh-tips-ic{ width:44px; height:44px; flex:0 0 auto; border-radius:10px; background:#fff; border:1px solid #d9e3f0;
  display:flex; align-items:center; justify-content:center; color:var(--blue); }
.dh-tips-ic .ic{ width:24px; height:24px; }
.dh-tips-body{ flex:1; min-width:0; }
.dh-tips-title{ display:block; font-size:14.5px; font-weight:700; }
.dh-tips-text{ display:block; font-size:13px; color:var(--muted); margin-top:2px; }
.dh-tips-start{ font:inherit; font-size:13.5px; font-weight:600; cursor:pointer; flex:0 0 auto;
  background:var(--blue); color:#fff; border:0; border-radius:8px; padding:9px 16px; text-decoration:none; }
.dh-tips-start:hover{ background:var(--blue2); color:#fff; text-decoration:none; }
.dh-tips-x{ width:30px; height:30px; flex:0 0 auto; border:0; background:transparent; border-radius:7px;
  color:var(--muted); cursor:pointer; display:flex; align-items:center; justify-content:center; }
.dh-tips-x:hover{ background:rgba(35,42,59,.08); color:var(--text); }
.dh-tips-x .ic{ width:17px; height:17px; }

/* ---- empty / first-run ---- */
.dh-empty-hero{ background:var(--card); border:1px solid var(--border); border-radius:12px;
  padding:34px 30px; text-align:center; box-shadow:0 2px 10px rgba(20,30,60,.06);
  background-image:radial-gradient(circle at 50% -30%, #f4f7fc, #fff 60%); }
.dh-empty-ic{ width:64px; height:64px; margin:0 auto 14px; border-radius:16px; background:#fdf0e6;
  color:var(--orange); display:flex; align-items:center; justify-content:center; }
.dh-empty-ic .ic{ width:34px; height:34px; }
.dh-empty-title{ font-size:24px; font-weight:700; letter-spacing:-.01em; color:#231f20; }
.dh-empty-sub{ font-size:14px; color:var(--muted); margin:8px auto 20px; max-width:44ch; line-height:1.5; }
.dh-empty-actions{ display:flex; gap:12px; justify-content:center; flex-wrap:wrap; }

/* ---- phone ---- */
@media screen and (max-width:600px){
  .dh-greet{ flex-direction:column; align-items:stretch; gap:12px; }
  .dh-hello{ font-size:21px; }
  .dh-greet-r{ gap:9px; }
  .dh-greet-r .dh-btn{ flex:1; justify-content:center; padding:10px; }
  .dh-continue{ flex-direction:column; }
  .dh-cont-thumb{ width:100%; border-right:0; border-bottom:1px solid var(--border); aspect-ratio:395/230; }
  .dh-cont-name{ font-size:19px; }
  .dh-cont-body{ padding:15px 16px; }
  .dh-cont-actions .dh-btn{ flex:1; justify-content:center; }
  /* Recent: horizontal swipe row */
  .dh-recent{ display:flex; gap:12px; overflow-x:auto; padding-bottom:6px;
    scroll-snap-type:x mandatory; -webkit-overflow-scrolling:touch; }
  .dh-recent .dh-rcard{ flex:0 0 150px; scroll-snap-align:start; }
  .dh-recent .dh-rextra{ display:block; } /* swipe row scrolls through all 15 */
  .dh-sec-head .dh-recent-seeall{ display:none; } /* no "See all" on phone — the row already scrolls all */
  /* Folders: full-width list rows (name left, count right) */
  .dh-folders{ grid-template-columns:1fr; gap:9px; }
  .dh-folder{ padding:10px 13px; }
  .dh-folder-ic{ width:34px; height:34px; border-radius:8px; }
  .dh-folder-tx{ flex:1; display:flex; flex-direction:row; align-items:baseline; gap:8px; }
  .dh-folder-name{ -webkit-line-clamp:1; white-space:nowrap; text-overflow:ellipsis; min-width:0; }
  .dh-folder-count{ margin-top:0; margin-left:auto; flex:0 0 auto; }
  .dh-folder:not(.newf)::after{ content:"\203A"; color:#9aa3b2; font-size:18px; font-weight:600; margin-left:4px; }
  /* Tips: icon+text on top, buttons underneath full-width */
  .dh-tips{ flex-wrap:wrap; }
  .dh-tips-body{ flex:1 1 60%; }
  .dh-tips-start{ flex:1 1 auto; text-align:center; order:3; }
  .dh-tips-x{ position:absolute; top:8px; right:8px; }
}
