/* Computer view — Claude Code 2026-11-09 (owner: "phone is ok, now we consider computer"; 10/10 computer view).
   Only on wide screens with a mouse (≥ 1100 px, pointer: fine): phones and touch tablets keep their own layout.
   Colours come from the theme (Royal Navy family), so all 9 themes follow. Remove the <link> to undo. */
.desk-rail { display: none; }

@media (min-width: 1100px) and (((hover: hover) and (pointer: fine)) or (orientation: landscape)) {
  :root { --rail-w: 264px; }

  /* ------------------------------------------------------------------ side bar */
  .desk-rail {
    display: flex; flex-direction: column; gap: 2px;
    position: fixed; z-index: 40; inset: 0 auto 0 0; width: var(--rail-w); box-sizing: border-box;
    padding: 22px 14px 16px; overflow-y: auto;
    background: linear-gradient(180deg, color-mix(in srgb, var(--vt-base) 80%, transparent), color-mix(in srgb, var(--vt-base) 92%, transparent));
    border-right: 1px solid rgba(243, 213, 138, .26);
    -webkit-backdrop-filter: blur(18px) saturate(1.2); backdrop-filter: blur(18px) saturate(1.2);
    box-shadow: 10px 0 34px rgba(0, 0, 0, .28);
    font-family: "Manrope", var(--sans);
  }
  .desk-rail .dr-brand { display: flex; align-items: center; gap: 10px; padding: 2px 8px 18px; margin-bottom: 8px; text-decoration: none;
    border-bottom: 1px solid rgba(243, 213, 138, .18); }
  .desk-rail .dr-brand img { width: 54px; height: auto; flex: none; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .35)); }
  .desk-rail .dr-wm { display: grid; gap: 3px; }
  .desk-rail .dr-wm b { font: 600 28px/1 var(--serif-display, "Cormorant Garamond", Georgia, serif); letter-spacing: -.01em; }
  .desk-rail .dr-lexi { color: #FFF6DA; }
  .desk-rail .dr-global { color: #E9C77A; }
  .desk-rail .dr-wm small { white-space: nowrap; font: 600 9.5px/1.2 var(--serif-display, "Cormorant Garamond", Georgia, serif); letter-spacing: .16em; text-transform: uppercase; color: #E9C77A; }
  .desk-rail .dr-nav { display: grid; gap: 2px; }
  .desk-rail .dr-item {
    position: relative; display: flex; align-items: center; gap: 13px; width: 100%; min-height: 44px; padding: 0 12px; box-sizing: border-box;
    border: 0; border-radius: 12px; background: none; cursor: pointer; text-decoration: none; text-align: left;
    font: 600 15px/1.2 "Manrope", var(--sans); color: rgba(245, 238, 220, .86);
    transition: background .15s ease, color .15s ease;
  }
  .desk-rail .dr-item .ic { width: 20px; height: 20px; flex: none; color: #E2BE72; opacity: .9; }
  .desk-rail .dr-item:hover { background: rgba(255, 255, 255, .06); color: #FFFDF7; }
  .desk-rail .dr-item:focus-visible { outline: 2px solid #F3D58A; outline-offset: 2px; }
  .desk-rail .dr-item[aria-current="page"] {
    color: #FFF6DA; background: linear-gradient(90deg, rgba(243, 213, 138, .20), rgba(243, 213, 138, .05));
    box-shadow: inset 0 0 0 1px rgba(243, 213, 138, .32);
  }
  .desk-rail .dr-item[aria-current="page"]::before {
    content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0;
    background: linear-gradient(180deg, #FFF0C4, #D7A649); box-shadow: 0 0 10px rgba(243, 213, 138, .6);
  }
  .desk-rail .dr-item[aria-current="page"] .ic { color: #F3D58A; opacity: 1; }
  .desk-rail .dr-sep { height: 1px; margin: 12px 8px; background: rgba(243, 213, 138, .18); }
  .desk-rail .dr-me {
    margin-top: auto; display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; cursor: pointer; text-align: left;
    background: rgba(255, 255, 255, .05); border: 1px solid rgba(243, 213, 138, .28); color: #FFFDF7;
  }
  .desk-rail .dr-me:hover { background: rgba(255, 255, 255, .09); }
  .desk-rail .dr-coin {
    width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center;
    font: 700 19px/1 "Cormorant Garamond", Georgia, serif; color: #2A1C05;
    background: radial-gradient(circle at 35% 30%, #FFF6D8 0%, #EBC673 48%, #A97A2A 100%);
    border: 1px solid #F3D896; box-shadow: inset 0 -2px 0 rgba(110, 74, 14, .35), 0 3px 8px rgba(0, 0, 0, .3);
  }
  .desk-rail .dr-me-t { display: grid; gap: 2px; min-width: 0; }
  .desk-rail .dr-name { font: 700 15px/1.2 "Manrope", var(--sans); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .desk-rail .dr-me-t small { font: 500 12px/1.2 "Manrope", var(--sans); color: rgba(245, 238, 220, .7); }

  /* the page sits to the right of the side bar; the phone bottom bar and name ribbon are not needed */
  body { padding-left: var(--rail-w) !important; box-sizing: border-box; }
  html body #bottomNav, html body[data-route] #bottomNav.bottom-nav, html body[data-route]:has(#v-meet .mt-head) #bottomNav.bottom-nav, .name-ribbon { display: none !important; }
  .app { padding-bottom: 40px !important; }
  /* during a live call the meeting has the whole screen */
  body:has(#v-meet .mt-head-live) { padding-left: 0 !important; }
  body:has(#v-meet .mt-head-live) .desk-rail { display: none; }
  /* the logo lives in the side bar: the page header keeps only the language picker */
  #brandHeader .brand-row .brand, #brandHeader .brand { display: none !important; }

  /* ------------------------------------------------------------------ Home */
  body[data-route="home"] .app { max-width: min(1180px, calc(100vw - var(--rail-w) - 72px)) !important; width: 100% !important; position: relative; padding-top: 30px !important; }
  body[data-route="home"] #brandHeader { position: absolute !important; top: 30px; right: 0; margin: 0 !important; padding: 0 !important; height: 60px; z-index: 6;
    display: flex !important; align-items: center; }
  body[data-route="home"] html #brandHeader #langPick, body[data-route="home"] #brandHeader #langPick {
    font-size: 15px !important; padding: 0 22px !important; height: 60px !important; min-width: 168px; justify-content: center; border-radius: 999px !important; }
  body[data-route="home"] #brandHeader #langPick .ic { width: 16px !important; height: 16px !important; }
  #v-home:not([hidden]) { display: flex !important; flex-direction: column; gap: 22px !important; }
  #v-home .home-search { order: 1; margin: 0 !important; padding-right: 186px; }
  #v-home .home-search .search { min-height: 60px !important; border-radius: 999px !important; }
  #v-home .home-search .search input { font-size: 17px !important; }
  #v-home .myspace { order: 2; }
  #v-home .shortcuts { order: 3; }
  #v-home .saved-card { display: none !important; }

  /* hero: Word of the Day as a wide panel over the photo, My Space keys below it */
  #v-home section.card.myspace { flex: none !important; min-height: 0 !important; padding: 0 !important; overflow: hidden; border-radius: 26px !important; }
  #v-home .myspace .ms-head { display: none !important; }
  #v-home .myspace .ms-banner { margin: 0 !important; min-height: clamp(380px, calc(100vh - 490px), 620px) !important; border-radius: 26px !important; }
  #v-home .myspace.has-wotd .ms-banner-content { padding: 40px 44px 26px !important; gap: 22px !important; }
  #v-home .myspace .wotd { gap: 10px; padding: 0; max-width: 760px; }
  #v-home .myspace .wotd-k { font-size: 13px !important; letter-spacing: .22em; }
  #v-home .myspace .wotd-w { font-size: 84px !important; line-height: .95 !important; }
  #v-home .myspace .wotd-meta { font-size: 18px !important; gap: 10px; }
  #v-home .myspace .wotd-play { width: 42px; height: 42px; }
  #v-home .myspace .wotd-play .ic { width: 19px; height: 19px; }
  #v-home .myspace .wotd-tr { font-size: 26px !important; }
  #v-home .myspace .wotd-def { font-size: 18px !important; max-width: 40em; -webkit-line-clamp: 3; }
  #v-home .myspace .ms-banner-chips { max-width: 560px; border-radius: 16px !important; }
  #v-home .myspace .ms-chip { font-size: 15px !important; padding: 14px 10px !important; gap: 9px !important; }
  #v-home .myspace .ms-chip .ic { width: 18px !important; height: 18px !important; }

  /* the 6 sections: 3 × 2 wide cards, icon on the left, text readable from a desk */
  #v-home .shortcuts { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)) !important; grid-auto-rows: 1fr; gap: 18px !important; }
  #v-home .shortcuts .shortcut {
    display: grid !important; grid-template-columns: 56px minmax(0, 1fr) !important; grid-template-rows: auto auto !important;
    align-content: center !important; justify-items: start !important; text-align: left !important;
    column-gap: 18px !important; row-gap: 5px !important; min-height: 112px !important; padding: 22px 24px !important; border-radius: 20px !important;
  }
  #v-home .shortcuts .shortcut > .ic {
    grid-row: 1 / span 2; align-self: center; width: 56px !important; height: 56px !important; padding: 14px; box-sizing: border-box; margin: 0 !important;
    border-radius: 50%; background: rgba(243, 213, 138, .10); border: 1px solid rgba(243, 213, 138, .42); color: #F3D58A;
  }
  #v-home .shortcuts .shortcut .t { font-size: 23px !important; line-height: 1.15 !important; white-space: nowrap; min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  #v-home .shortcuts .shortcut .t .ic { display: inline-block !important; width: 15px !important; height: 15px !important; margin-left: 6px; opacity: .55; transition: transform .2s ease, opacity .2s ease; }
  #v-home .shortcuts .shortcut:hover .t .ic { transform: translateX(3px); opacity: 1; }
  #v-home .shortcuts .shortcut .s { font-size: 15px !important; line-height: 1.35 !important; letter-spacing: 0 !important;
    white-space: normal !important; display: block !important; -webkit-line-clamp: unset !important; min-width: 0; }
  #v-home .shortcuts .shortcut:hover { border-color: rgba(243, 213, 138, .85) !important; }
}

/* medium computer screens (1100–1399 px): slimmer side bar, smaller card icons, titles may wrap — never cut */
@media (min-width: 1100px) and (max-width: 1399px) and (((hover: hover) and (pointer: fine)) or (orientation: landscape)) {
  :root { --rail-w: 232px; }
  .desk-rail .dr-wm b { font-size: 25px; }
  .desk-rail .dr-wm small { font-size: 8.5px; letter-spacing: .12em; white-space: nowrap; }
  .desk-rail .dr-brand img { width: 46px; }
  body[data-route="home"] .app { max-width: calc(100vw - var(--rail-w) - 48px) !important; }
  #v-home .shortcuts { gap: 14px !important; }
  #v-home .shortcuts .shortcut { grid-template-columns: 46px minmax(0, 1fr) !important; column-gap: 14px !important; padding: 18px !important; min-height: 100px !important; }
  #v-home .shortcuts .shortcut > .ic { width: 46px !important; height: 46px !important; padding: 11px; }
  #v-home .shortcuts .shortcut .t { font-size: 20px !important; white-space: normal !important; overflow: visible !important; }
  #v-home .shortcuts .shortcut .t .ic { display: none !important; }
  #v-home .shortcuts .shortcut .s { font-size: 14px !important; }
  #v-home .myspace .wotd-w { font-size: 68px !important; }
  #v-home .myspace .ms-banner { min-height: clamp(310px, calc(100vh - 480px), 520px) !important; }
}

/* ===== 2026-11-09 computer polish (owner "yes try" on the 9.2 review) ===== */
@media (min-width: 1100px) and (((hover: hover) and (pointer: fine)) or (orientation: landscape)) {
  /* 1. calm cards: no moving shine; a soft gold glow on hover instead */
  #v-home .shortcuts .shortcut .btn-sheen { display: none !important; animation: none !important; }
  #v-home .shortcuts .shortcut { transition: transform .2s ease, box-shadow .25s ease, border-color .25s ease !important; }
  :root[data-theme] body[data-route] #v-home .shortcuts .shortcut:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 0 0 1px rgba(243, 213, 138, .55), 0 12px 28px rgba(0, 0, 0, .32), 0 0 28px rgba(243, 213, 138, .22) !important;
  }
  #v-home .shortcuts .shortcut:hover > .ic { background: rgba(243, 213, 138, .2); border-color: rgba(243, 213, 138, .8); }
  /* 2. language pill exactly on the search row and the grid's right edge */
  body[data-route="home"] #brandHeader { right: 14px !important; top: 33px !important; height: 60px !important; }
  /* 3. Word of the Day example sentence */
  #v-home .myspace .wotd-ex {
    display: block; max-width: 40em; font: italic 500 21px/1.45 "Cormorant Garamond", Georgia, serif; color: rgba(255, 246, 218, .92);
    padding-left: 14px; border-left: 2px solid rgba(243, 213, 138, .7); text-shadow: 0 1px 6px rgba(0, 0, 0, .8);
  }
  #v-home .myspace .wotd-def { -webkit-line-clamp: 2 !important; }
  /* 4. side bar: the current page in soft gold with the gold bar on its left edge */
  .desk-rail .dr-item[aria-current="page"] {
    color: #FFE8A3 !important;
    background: linear-gradient(90deg, rgba(243, 213, 138, .26), rgba(243, 213, 138, .08) 70%, rgba(243, 213, 138, 0)) !important;
    box-shadow: inset 0 0 0 1px rgba(243, 213, 138, .38) !important;
  }
  /* 5. clearer hover arrows; the name card in the hero's gold */
  #v-home .shortcuts .shortcut .t .ic { opacity: .85 !important; color: #F3D58A !important; }
  .desk-rail .dr-me {
    background: linear-gradient(135deg, rgba(243, 213, 138, .16), rgba(243, 213, 138, .04)) !important;
    border-color: rgba(243, 213, 138, .55) !important; box-shadow: inset 0 1px 0 rgba(255, 240, 200, .14), 0 6px 18px rgba(0, 0, 0, .25);
  }
  .desk-rail .dr-me:hover { border-color: rgba(243, 213, 138, .85) !important; }
  .desk-rail .dr-name { color: #FFE8A3; }
}
/* the example sentence is for the computer view only — phones and tablets keep their layout */
#v-home .myspace .wotd-ex { display: none; }
@media (min-width: 1100px) and (((hover: hover) and (pointer: fine)) or (orientation: landscape)) { #v-home .myspace .wotd-ex { display: block; } }

/* ===== 2026-11-09 dictionary side panel (owner: "add dictionary when user learn so they can check", Home too) ===== */
.dict-panel { display: none; }
/* panel mode: this app inside the panel shows only the dictionary page (phone layout, no side bar / header / bottom bar) */
html.embed #deskRail, html.embed #bottomNav, html.embed .name-ribbon, html.embed #brandHeader, html.embed .home-bg, html.embed .credit,
html.embed .dict-panel { display: none !important; }
html.embed body { padding-left: 0 !important; }
html.embed .app { padding-top: 6px !important; padding-bottom: 18px !important; max-width: none !important; }

@media (min-width: 1600px) and (((hover: hover) and (pointer: fine)) or (orientation: landscape)) {
  body[data-route="home"] .app { max-width: min(1680px, calc(100vw - var(--rail-w) - 72px)) !important; }
  #v-home:not([hidden]) { display: grid !important; grid-template-columns: minmax(0, 1fr) 470px; column-gap: 24px; row-gap: 22px !important; align-items: start; }
  #v-home .home-search { grid-column: 1 / -1; grid-row: 1; }
  #v-home .myspace { grid-column: 1; grid-row: 2; }
  #v-home .shortcuts { grid-column: 1; grid-row: 3; }
  #v-home .dict-panel { grid-column: 2; grid-row: 2 / span 2; align-self: stretch; }
  .dict-panel {
    display: flex; flex-direction: column; min-height: 0; overflow: hidden; border-radius: 24px;
    background: color-mix(in srgb, var(--vt-base) 72%, transparent); border: 1px solid rgba(243, 213, 138, .45);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 14px 34px rgba(0, 0, 0, .3);
  }
  .dict-panel .dp-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid rgba(243, 213, 138, .22); }
  .dict-panel .dp-dot { width: 8px; height: 8px; border-radius: 50%; background: #F3D58A; box-shadow: 0 0 10px rgba(243, 213, 138, .7); flex: none; }
  .dict-panel .dp-t { font: 700 13px/1 "Manrope", var(--sans); letter-spacing: .18em; text-transform: uppercase; color: #F3D58A; }
  .dict-panel .dp-w { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 18px/1.1 "Cormorant Garamond", Georgia, serif; color: #FFFDF7; }
  .dict-panel .dp-open { font: 600 13px/1 "Manrope", var(--sans); color: #F3D58A; text-decoration: none; padding: 7px 12px; border-radius: 999px; border: 1px solid rgba(243, 213, 138, .45); }
  .dict-panel .dp-open:hover { background: rgba(243, 213, 138, .14); }
  .dict-panel .dp-frame { flex: 1; width: 100%; min-height: 520px; border: 0; background: transparent; }
}
/* 1600–1999 px: the 3 cards share a narrower column — compact card text, titles may wrap */
@media (min-width: 1600px) and (max-width: 1999px) and (((hover: hover) and (pointer: fine)) or (orientation: landscape)) {
  #v-home .shortcuts { gap: 14px !important; }
  #v-home .shortcuts .shortcut { grid-template-columns: 46px minmax(0, 1fr) !important; column-gap: 14px !important; padding: 18px !important; min-height: 100px !important; }
  #v-home .shortcuts .shortcut > .ic { width: 46px !important; height: 46px !important; padding: 11px; }
  #v-home .shortcuts .shortcut .t { font-size: 20px !important; white-space: normal !important; overflow: visible !important; }
  #v-home .shortcuts .shortcut .t .ic { display: none !important; }
  #v-home .shortcuts .shortcut .s { font-size: 14px !important; }
  #v-home .myspace .wotd-w { font-size: 72px !important; }
  #v-home .myspace .ms-banner { min-height: clamp(330px, calc(100vh - 520px), 560px) !important; }
}

/* 2026-11-09 dictionary panel: language button in the gold top bar (owner: "add button change language") */
@media (min-width: 1280px) and (((hover: hover) and (pointer: fine)) or (orientation: landscape)) {
  .dict-panel .dp-lang {
    display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; cursor: pointer; flex: none;
    font: 700 13px/1 "Manrope", var(--sans); color: #2A1C05;
    background: linear-gradient(180deg, #FFF0C4, #D7A649); border: 1px solid #F3D896;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 3px 8px rgba(0, 0, 0, .3);
  }
  .dict-panel .dp-lang .ic { width: 15px; height: 15px; }
  .dict-panel .dp-lang:hover { filter: brightness(1.06); }
  .dict-panel .dp-lang:focus-visible { outline: 2px solid #FFF0C4; outline-offset: 2px; }
  .dict-panel .dp-w { flex: 1 1 auto; }
}

/* 2026-11-11 owner "colour follow ui academic", "all themes": the dictionary page inside a side panel (?embed=1) uses the
   theme's --btn-a / --btn-b (the colour of Academic's Learn bar and word header) instead of the darker --vt-base. */
html.embed, html.embed body { background: linear-gradient(180deg, var(--btn-a, #37627B) 0, var(--btn-b, #234256) 520px, var(--btn-b, #234256) 100%) fixed !important; }
html.embed .ambient { display: none !important; }
html.embed #v-dict .word-head { background: transparent !important; }
html:not(.embed) .dict-panel { background: var(--btn-b, #234256) !important; }
html:not(.embed) .dict-panel .dp-head { background: linear-gradient(180deg, var(--btn-a, #37627B), color-mix(in srgb, var(--btn-a, #37627B) 50%, var(--btn-b, #234256))) !important; }
/* 2026-11-11 owner "header and footer must always be the same line": the Home dictionary panel never makes its grid rows taller,
   so its top = Word of the Day top and its bottom = the card row bottom */
@media (min-width: 1600px) and (((hover: hover) and (pointer: fine)) or (orientation: landscape)) {
  #v-home .dict-panel { contain: size; min-height: 0 !important; height: auto !important; align-self: stretch !important; }
}
@media (min-width: 1600px) and (((hover: hover) and (pointer: fine)) or (orientation: landscape)) {
  #v-home .myspace, #v-home .shortcuts { align-self: stretch !important; }
}

/* 2026-11-14 owner (tablet held sideways): "move the 6 cards to the same level as the Sophal card, and move My Space up a bit
   so we see more waterfall". TABLET ONLY (touch, sideways) — owner: "for computer error, keep the previous one" → computers
   keep the earlier layout untouched. Home fills the screen down to the bottom of the name card (rail padding 16 px); the cards
   sit at the bottom, level with it; My Space sits closer under the search bar; the gap between shows the waterfall. */
@media (min-width: 1100px) and (orientation: landscape) and (not ((hover: hover) and (pointer: fine))) {
  #v-home:not([hidden]) { min-height: calc(100dvh - 30px - 16px); box-sizing: border-box; }
  #v-home .myspace { margin-top: -10px !important; }
  #v-home .myspace .ms-banner { min-height: clamp(330px, calc(100vh - 490px), 620px) !important; }
  #v-home .shortcuts { margin-top: auto !important; }
  /* the phone tab bar's 104 px bottom space is not used here → Home ends 16 px above the screen bottom, level with the name card */
  .app:has(#v-home:not([hidden])) { padding-bottom: 16px !important; }
}
@media (min-width: 1100px) and (max-height: 820px) and (orientation: landscape) and (not ((hover: hover) and (pointer: fine))) {
  #v-home:not([hidden]) { gap: 14px !important; }   /* short tablet screens: Home still fits without scrolling */
}
