/* Web shell on computers and tablets (owner 11-24: "电脑直接访问特别丑很奇怪"). Linked after web-shell.css.
   Everything is inside min-width media queries (560 px and up) — phones are untouched — except the last section, the
   menu pick card's long names, which applies at every width.
   The app stays a 480 px phone column (web-shell.css); this file only
   1. makes that column the frame for everything pinned inside the app — headers, tab bar, sheets, bottom bars and
      notices are positioned against the column instead of the window, so they can no longer escape it at any width
      (the old 760 px rules then resolve to the same offsets as on a phone: calc(50% - 240px) of 480 px = 0);
   2. replaces the flat black around it with a quiet house backdrop: deep green baize with a fine gold pinstripe, a
      soft lamp-light behind the column and darker edges; the column gets a double gold hairline like a framed card;
   3. on wide windows, sets the house name in small spaced capitals either side of the column.
   CSS only: gradients, no images. Taro's own toasts and dialogs live outside the app and stay centred on the window,
   which is also the column's centre. */
@media (min-width: 560px) {
  html {
    min-height: 100%;
    background:
      radial-gradient(42% 58% at 50% 38%, rgba(226, 196, 135, .075), rgba(226, 196, 135, 0) 70%),
      radial-gradient(130% 100% at 50% 45%, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, .55) 100%),
      repeating-linear-gradient(90deg, rgba(217, 189, 116, .03) 0 1px, rgba(217, 189, 116, 0) 1px 10px),
      repeating-linear-gradient(0deg, rgba(243, 234, 210, .012) 0 1px, rgba(243, 234, 210, 0) 1px 4px),
      linear-gradient(180deg, #0c1a13, #060d09) #08110d;
    background-attachment: fixed;
  }
  html body { background: transparent; }
  /* Taro's outermost box (pages + tab bar, the whole phone screen) is the column. It becomes the containing block for
     position: fixed inside it (a transform does this in every browser), so "the bottom of the screen" is the bottom of
     the column, exactly as on a phone. It already clips its content, which does not clip its own frame. */
  body > .taro-tabbar__container {
    transform: translateZ(0);
    background-color: #08110d;
    box-shadow: 0 0 0 1px rgba(217, 189, 116, .34), 0 0 0 6px #070e0a, 0 0 0 7px rgba(217, 189, 116, .16), 0 30px 120px rgba(0, 0, 0, .72);
  }
  #app { box-shadow: none; }
}

/* Wide windows: the house name, quietly, either side of the column (never over it: hidden below 1080 px). */
@media (min-width: 1080px) {
  body::before, body::after {
    position: fixed; top: 50%; z-index: 0; padding: 72px 0;
    color: rgba(217, 189, 116, .42); font-family: var(--lc-serif, Georgia, serif); font-size: 13px; line-height: 1;
    letter-spacing: .72em; text-transform: uppercase; writing-mode: vertical-rl; white-space: nowrap; pointer-events: none;
    background:
      linear-gradient(rgba(217, 189, 116, .38), rgba(217, 189, 116, .38)) center top / 1px 44px no-repeat,
      linear-gradient(rgba(217, 189, 116, .38), rgba(217, 189, 116, .38)) center bottom / 1px 44px no-repeat;
    transform: translateY(-50%);
  }
  body::before { content: "Liquidity"; left: calc(50% - 240px - 120px); }
  body::after { content: "Club"; right: calc(50% - 240px - 120px); }
}
@media (min-width: 1080px) and (max-height: 520px) { body::before, body::after { display: none; } }

/* Pinned elements that web-shell.css places for a 480 px column with calc(50% - 240px + X): against the column (the
   containing block above) that is simply X, whatever the column's width — the same offsets as on a phone. Restated
   here so a wider column (very large screens, the club's 1120 px) keeps them in place. Same 760 px threshold. */
@media (min-width: 760px) {
  .web-use-bar { left: 0; right: 0; }
  .button.web-use-bar__button { right: 14px; }
  .web-sheet__panel { left: 0; right: 0; }
  .web-header-actions { right: 66px !important; }
  .screen--menu .market-strip.is-ready .market-strip__state, .screen--market .market-strip.is-ready .market-strip__state { left: 106px; }
  .screen--menu .market-strip > .web-table-chip { right: 106px; }
  .screen--menu .web-table-chip__pop { right: 16px !important; }
  .web-sellback-sheet > .opening-panel.web-sellback, .opening-panel.web-review { left: 0; right: 0; }
  .web-vnotice { left: 12px; right: 12px; }
}
/* The club widens the column to 1120 px (web-club.scss): no side lettering then (it would sit on the page), and its
   floating button, written against the window, sits 24 px in from the column's right edge as intended. */
@media (min-width: 820px) {
  body.web-club-wide::before, body.web-club-wide::after { display: none; }
  body.web-club-wide .web-club .wc-fab { right: 24px; }
}

/* Very large screens (owner 11-24): the column widens to 560 px, a larger phone; everything above follows it.
   (Scaling it instead does not work: pages size their scroll areas with 100vh.) The club keeps its own 1120 px. */
@media (min-width: 1600px) {
  #app, body > .taro-tabbar__container, .taro-tabbar__tabbar, .taro-tabbar__tabbar-bottom { max-width: 560px; }
  body::before { left: calc(50% - 280px - 120px); }
  body::after { right: calc(50% - 280px - 120px); }
}

/* ===== All widths, phones included: the menu's "随心选一款" card. A name too wide for one line used to break wherever
   the line ran out and lose its second line under the footer strip. Such names now set a size smaller, balanced over
   at most two lines that fit the card, never split inside a word or number; every name that fits one line keeps its
   size. pages/menu/index.tsx marks the width (web only): --long is past a phone's line (about 6.5 Chinese characters),
   --xlong past the line in the computer column (about 11). */
@media (max-width: 559px) {
  .web-picks .menu-pick .menu-pick__identity--long .menu-pick__name { font-size: 17px !important; line-height: 1.24 !important; }
}
.web-picks .menu-pick .menu-pick__identity--xlong .menu-pick__name { font-size: 17px !important; line-height: 1.24 !important; }
.web-picks .menu-pick .menu-pick__identity--long .menu-pick__name { overflow-wrap: break-word; word-break: normal; line-break: strict; text-wrap: balance; }
