/*!
 * MyAppClub Club Panel Kit 1.0.0 (UMR-005 v5.9 item 53, 29 Nov 2026)
 * My Touch Book's MyAppClub panel look, standalone. Every class is .mcp-*; the colours are this file's own variables
 * (set on .mcp-screen), never the host page's. --mcp-app = this app's theme colour (set by club-panel.js from APP_THEME),
 * --c = one card's app colour. Items 41 (soft colours), 43 (You are here) and 46 (small boxes, wide panel) included.
 */

/* ---- the "▦ MyAppClub" button (for a dark app top bar, as in My Touch Book) ---- */
.mcp-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: 10px; cursor: pointer;
  background: rgba(242, 185, 75, .14); color: inherit; border: 1px solid rgba(242, 185, 75, .7); font: inherit; font-weight: 700; font-size: .9rem; white-space: nowrap; }
.mcp-btn:hover, .mcp-btn:focus-visible { background: rgba(242, 185, 75, .28); }
.mcp-btn:focus-visible { outline: 3px solid #F2B94B; outline-offset: 2px; }
.mcp-btn .mcp-svg { width: 18px; height: 18px; }
@media (max-width: 560px) { .mcp-btn .mcp-btn-text { display: none; } .mcp-btn { padding: 0 9px; } }

/* ---- the full-screen panel ---- */
body.mcp-open { overflow: hidden; }
.mcp-screen {
  --mcp-app: #104a36; --mcp-gold: #F2B94B; --mcp-bg: #F6F4EC; --mcp-ink: #24302a; --mcp-muted: #5b6560; --mcp-line: #e4e0d4; --mcp-white: #fff;
  position: fixed; inset: 0; z-index: 1000; display: flex; flex-direction: column; background: var(--mcp-bg); color: var(--mcp-ink);
  font: 400 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Gujarati", "Noto Sans Devanagari", sans-serif;
  text-align: start; animation: mcp-in 180ms ease-out; container-type: inline-size; container-name: mcppanel; -webkit-text-size-adjust: 100%;
}
.mcp-screen *, .mcp-screen *::before, .mcp-screen *::after { box-sizing: border-box; }
@keyframes mcp-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.mcp-svg { width: 20px; height: 20px; display: block; flex: none; }
.mcp-screen[dir="rtl"] .mcp-svg-back { transform: scaleX(-1); }

/* top bar in the app colour: MyAppClub title, the app-name pill (Back) and ✕ */
.mcp-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; padding-top: calc(12px + env(safe-area-inset-top));
  background: var(--mcp-app); color: #fff; }
.mcp-top-title { display: flex; align-items: center; gap: 10px; font-size: 1.15rem; flex-wrap: wrap; min-width: 0; }
.mcp-top-title > strong { font-weight: 700; }
.mcp-icon { display: inline-grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 10px; background: #eef3f0; color: #104a36; }
.mcp-top .mcp-icon { background: rgba(242, 185, 75, .25); color: var(--mcp-gold); }
.mcp-appname { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; max-width: 100%; padding: 0 12px 0 4px; border-radius: 999px; text-decoration: none; white-space: nowrap;
  color: #fff; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .45); font-size: .9rem; font-weight: 600; }
.mcp-screen[dir="rtl"] .mcp-appname { padding: 0 4px 0 12px; }
.mcp-appname:hover, .mcp-appname:focus-visible { background: rgba(255, 255, 255, .24); }
.mcp-appname-name { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.mcp-appname-logo { display: inline-grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--mcp-gold); color: var(--mcp-app); font-size: .68rem; font-weight: 800; }
.mcp-close { display: inline-grid; place-items: center; flex: none; width: 40px; height: 40px; padding: 0; border-radius: 10px; cursor: pointer; font: inherit;
  color: #fff; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .35); }
.mcp-close:hover { background: rgba(255, 255, 255, .24); }
.mcp-top a:focus-visible, .mcp-close:focus-visible { outline: 3px solid var(--mcp-gold); outline-offset: 2px; }

/* body: content min(1070px, 100%), 16px sides, scrolls inside */
.mcp-body { flex: 1; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; width: min(1070px, 100%); margin: 0 auto;
  padding: 16px; padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
.mcp-loading, .mcp-lead, .mcp-none { color: var(--mcp-muted); }
.mcp-lead { margin: 0 0 12px; }
.mcp-none { margin: 12px 0 0; }

/* the top cards: 2 side by side from 600px, 1 column under */
.mcp-grid { display: grid; grid-template-columns: 1fr; gap: 10px; margin: 4px 0 14px; }
@media (min-width: 600px) { .mcp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container mcppanel (max-width: 599px) { .mcp-grid { grid-template-columns: 1fr; } }
@container mcppanel (min-width: 600px) { .mcp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.mcp-box { display: block; min-width: 0; text-align: start; text-decoration: none; color: var(--mcp-ink); background: var(--mcp-white); border: 1.5px solid var(--mcp-line);
  border-radius: 14px; padding: 16px; cursor: pointer; font: inherit; transition: box-shadow 120ms ease; }
@media (max-width: 599px) { .mcp-box { padding: 12px; } .mcp-box small { font-size: .78rem; } }
.mcp-box-in { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 14px; row-gap: 2px; align-items: center; }
.mcp-box-in .mcp-icon { grid-row: 1 / span 2; width: 44px; height: 44px; border-radius: 12px; }
.mcp-box-in strong { font-size: 1.1rem; font-weight: 700; min-width: 0; overflow-wrap: anywhere; line-height: 1.3; }
.mcp-box-in small { min-width: 0; color: var(--mcp-muted); font-size: .85rem; }
.mcp-box:hover { box-shadow: 0 6px 16px rgba(16, 74, 54, .10); }
.mcp-box:focus-visible { outline: 3px solid var(--mcp-gold); outline-offset: 2px; }
/* club website = soft cream with club green text */
.mcp-box.mcp-home { background: #fffaf0; background: linear-gradient(135deg, #fffaf0, #f6edd6); border-color: #e2c98b; color: #1d5a40; }
.mcp-box.mcp-home strong { color: #1d5a40; }
.mcp-box.mcp-home small { color: #5b665f; }
.mcp-box.mcp-home .mcp-icon { background: #fff; border: 1px solid #e2c98b; color: #1d5a40; }
/* "<App> · Back" = white to this app's light tint, arrow box in the app colour */
.mcp-box.mcp-back:not(.mcp-from) { background: #fff; border-color: var(--mcp-line); color: var(--c, #1d5a40); }
.mcp-box.mcp-back:not(.mcp-from) strong { color: var(--c, #1d5a40); }
.mcp-box.mcp-back:not(.mcp-from) small { color: #5b665f; }
.mcp-box.mcp-back:not(.mcp-from) .mcp-icon { background: var(--c, #1d5a40); color: #fff; }
/* "← Back to <other app>" in that other app's colour */
.mcp-box.mcp-from .mcp-icon { background: #fff; color: var(--c, #1d5a40); border: 1px solid var(--mcp-line); }
/* My UniLogin (signed out only) */
.mcp-box.mcp-uni .mcp-icon { background: #eaf0f8; color: #0b2a5b; }
@supports (color: color-mix(in srgb, red 50%, blue)) {
  .mcp-box.mcp-back:not(.mcp-from) { background: linear-gradient(135deg, #ffffff, color-mix(in srgb, var(--c) 8%, #fff)); border-color: color-mix(in srgb, var(--c) 30%, #fff); }
  .mcp-box.mcp-from { background: color-mix(in srgb, var(--c) 7%, #fff); border-color: color-mix(in srgb, var(--c) 28%, #fff); }
  .mcp-box.mcp-from .mcp-icon { border-color: color-mix(in srgb, var(--c) 28%, #fff); }
}

/* Our Apps head, count and search */
.mcp-apps-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 8px 0; flex-wrap: wrap; }
.mcp-apps-head h2 { margin: 0; font-size: 1.25rem; font-weight: 700; color: var(--mcp-ink); }
.mcp-count { color: var(--mcp-muted); font-size: .9rem; }
.mcp-find { display: block; width: 100%; max-width: 360px; height: 40px; margin: 0 0 12px; padding: 0 12px; border: 1px solid var(--mcp-line); border-radius: 10px;
  background: #fff; color: var(--mcp-ink); font: inherit; font-size: 1rem; }
.mcp-find:focus { outline: 3px solid var(--mcp-gold); outline-offset: 1px; border-color: var(--mcp-app); }

/* Our Apps small boxes: 4 columns at 1000px+, 3 at 760-999px, 2 at 480-759px, 1 under 480px (media first, container query on the panel) */
.mcp-cards { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 480px) { .mcp-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 760px) { .mcp-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .mcp-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@container mcppanel (max-width: 479px) { .mcp-cards { grid-template-columns: 1fr; } }
@container mcppanel (min-width: 480px) { .mcp-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container mcppanel (min-width: 760px) { .mcp-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@container mcppanel (min-width: 1000px) { .mcp-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.mcp-card { display: flex; align-items: center; gap: 10px; padding: 12px; min-height: 64px; min-width: 0; border-radius: 14px; text-decoration: none;
  background: #fff; color: var(--mcp-ink); border: 1.5px solid var(--mcp-line); transition: transform 120ms ease, box-shadow 120ms ease; }
.mcp-card[hidden] { display: none; }
.mcp-badge { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; font-weight: 800; font-size: .95rem; color: #fff; background: var(--c, #475569); }
.mcp-card-txt { display: grid; min-width: 0; flex: 1; }
.mcp-card-txt strong { color: var(--mcp-ink); font-size: 15px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.mcp-pill { flex: none; margin-inline-start: auto; padding: 2px 8px; border-radius: 999px; font-size: .72rem; font-weight: 700; white-space: nowrap; }
.mcp-card .mcp-pill.live { background: #fff; color: var(--c, #475569); border: 1px solid var(--mcp-line); }
/* coming soon: dashed grey */
.mcp-card.soon { border: 1.5px dashed #b9c4c0; background: #f6f8f7; color: var(--mcp-muted); }
.mcp-card.soon .mcp-badge { opacity: .6; }
.mcp-card.soon .mcp-pill.soon { background: #e9eeec; color: #4a5551; }
a.mcp-card:hover, a.mcp-card:focus-visible { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(16, 74, 54, .12); }
a.mcp-card:focus-visible { outline: 3px solid var(--mcp-gold); outline-offset: 2px; }
/* item 41: soft colours - light tint ~7%, 1.5px border ~28%, no dark filled cards */
@supports (color: color-mix(in srgb, red 50%, blue)) {
  a.mcp-card, .mcp-card.live { background: color-mix(in srgb, var(--c) 7%, #fff); border: 1.5px solid color-mix(in srgb, var(--c) 28%, #fff); }
  .mcp-card .mcp-pill.live { border-color: color-mix(in srgb, var(--c) 28%, #fff); }
  a.mcp-card:hover, a.mcp-card:focus-visible { border-color: color-mix(in srgb, var(--c) 45%, #fff); box-shadow: 0 6px 16px color-mix(in srgb, var(--c) 16%, transparent); }
}
/* item 43: "You are here" = a div with aria-current="page", never a link; same tint, 2.5px app-colour border + soft ring */
.mcp-card.here { background: #fff; border: 2.5px solid var(--c, #475569); box-shadow: 0 0 0 4px #eef0ee; cursor: default; transform: none; }
@supports (color: color-mix(in srgb, red 50%, blue)) {
  .mcp-card.here { background: color-mix(in srgb, var(--c) 7%, #fff); border: 2.5px solid var(--c); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 12%, #fff); }
}
.mcp-card.here .mcp-pill, .mcp-card.here .mcp-pill.live { background: var(--c, #475569); color: #fff; border: 1px solid var(--c, #475569); }

@media (prefers-reduced-motion: reduce) {
  .mcp-screen { animation: none; }
  .mcp-card, a.mcp-card:hover, a.mcp-card:focus-visible, .mcp-box { transition: none; transform: none; }
}
