/* Talky layout for a phone AND a computer (Toms 2026-11-23: «之前说要大大的 inbox，现在要改成均衡的大小 … 要做成适合电脑版本的和手机版本的»).
   Loaded after style.css and glass.css. Part 1 is layout for every look; part 2 is the Space look («做成像 space 的感觉»),
   the My Space Living Glass on its Sky Desk photo, switched on by <html data-look="space">. Classic = the peach glass as before. */

/* ---------- 1. layout, every look ---------- */

/* the side bar's name block exists only on a computer */
.side-brand { display: none; }
/* phone dock: Inbox and Send stay the two wide tabs (the brand block is the bar's first child now, so count from it) */
.tabs button { flex: 1; min-height: 58px; font-size: 14px; font-weight: 400; }
.tabs .side-brand + button, .tabs .side-brand + button + button { flex: 2; min-height: 68px; font-size: 17px; font-weight: 700; }
.tabs button.on { font-weight: 700; }

/* phone home: two balanced tiles side by side, then what waits for you */
.home-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; min-height: 0; margin: 10px 0 14px; }
.big-btn { min-height: 128px; font-size: 28px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 12px; }
.badge.big { margin-left: 0; font-size: 18px; min-width: 34px; padding: 2px 12px; }
.peeks { padding: 10px 14px 6px; }
.peek-head { display: flex; align-items: center; justify-content: space-between; min-height: 36px; }
.peek-head .link { min-height: 36px; font-size: 14px; }
.peek { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "who when" "text text"; gap: 2px 10px; width: 100%; text-align: left;
  min-height: 0; padding: 10px 2px; margin: 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: none; box-shadow: none;
  -webkit-backdrop-filter: none; backdrop-filter: none; font-weight: 400; }
.peek-who { grid-area: who; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.peek-who .dot { width: 9px; height: 9px; margin-right: 6px; }
.peek-when { grid-area: when; font-size: 13px; }
.peek-text { grid-area: text; color: var(--mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
/* 2026-11-24: "Waiting for you" at the top of the Inbox, and the rows of Gen's 09:00 still-waiting card. One line each, the desk it opens on top. */
.waitlist { padding: 10px 14px 6px; margin: 8px 0 12px; }
.waitlist.inside { padding: 0; margin: 8px 0 4px; border: 0; background: none; box-shadow: none; }
.wrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "meta go" "text go"; gap: 2px 10px; align-items: center; width: 100%; text-align: left;
  min-height: 0; padding: 10px 2px; margin: 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: none; box-shadow: none;
  -webkit-backdrop-filter: none; backdrop-filter: none; font-weight: 400; color: inherit; text-decoration: none; }
button.wrow, a.wrow, :root[data-look] button.wrow { color: inherit; font-weight: 400; min-height: 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: none; box-shadow: none; }
.wrow-meta { grid-area: meta; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wrow-text { grid-area: text; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.wrow.turn-ask, :root[data-look] .wrow.turn-ask { border-left: 4px solid #e03131; padding-left: 10px; }
.wrow.turn-still, :root[data-look] .wrow.turn-still { border-left: 4px solid #f59f00; padding-left: 10px; }
.wrow-go { grid-area: go; font-size: 14px; font-weight: 700; color: var(--brand); white-space: nowrap; }

/* a computer: a side bar on the left, the page uses the width */
@media (min-width: 1000px) {
  #app { max-width: none; margin: 0 28px 0 276px; padding: 14px 0 40px; }
  .tabs { top: 20px; bottom: 20px; left: 20px; right: auto; width: 230px; flex-direction: column; align-items: stretch; gap: 4px; padding: 18px 12px; overflow-y: auto; }
  .side-brand { display: block; padding: 8px 14px 20px; cursor: pointer; }
  .side-brand b { display: block; font-size: 26px; letter-spacing: -.5px; }
  .side-brand span { display: block; margin-top: 2px; }
  .tabs button, .tabs .side-brand + button, .tabs .side-brand + button + button {
    flex: none; min-height: 50px; padding: 0 16px; border-radius: 18px; font-size: 16px; font-weight: 600;
    display: flex; align-items: center; justify-content: space-between; text-align: left; }
  .tabs button.on { font-weight: 700; }
  /* the name sits in the side bar; the top bar keeps only the pin and Sign out */
  .bar > div:first-child { visibility: hidden; }
  .bar { padding: 4px 0 0; min-height: 44px; }
  /* every page but the Inbox keeps a readable line length */
  #app:not(.v-inbox) > :not(nav) { max-width: 880px; }
  .fsubmit { bottom: 12px; }
  .chat-compose { margin-bottom: 20px; }
  /* the Inbox: its three columns side by side, each scrolling on its own */
  .inbox-top { display: flex; align-items: baseline; justify-content: space-between; margin-top: -40px; }
  .inbox-top h1 { margin: 6px 0 10px; font-size: 30px; }
  .inbox-top .fontbar { margin: 0 240px 0 0; }
  .lanes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: start; }
  .lane { border-radius: 26px; padding: 4px 12px 12px; max-height: calc(100vh - 120px); overflow-y: auto; overscroll-behavior: contain;
    background: rgba(255, 255, 255, .22); border: 1px solid var(--line); }
  .lane-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 8px; padding: 12px 6px 8px; font-size: 18px; }
  .lane .card { margin: 8px 0; }
  .lane .empty { padding: 28px 8px; }
}
@media (min-width: 1000px) and (prefers-color-scheme: dark) {
  :root:not([data-look="space"]) .lane { background: rgba(255, 255, 255, .05); }
}

/* ---------- 2. the Space look: My Space's Living Glass on the Sky Desk photo ---------- */

:root[data-look="space"] {
  --bg: #9fc3dc; --card: rgba(235, 246, 255, .70); --ink: #152c3d; --mute: #3e5668; --line: rgba(255, 255, 255, .75);
  --brand: #2776b6; --brand-ink: #ffffff; --soft: rgba(39, 118, 182, .14);
  --g-edge: rgba(255, 255, 255, .8); --g-shadow: 0 16px 40px rgba(42, 80, 115, .20); --g-glow: rgba(39, 118, 182, .45);
  --g-sheet: rgba(235, 246, 255, .74); --g-dark: #17344a; --accent-light: #c9e9ff;
  color-scheme: light;
}
:root[data-look="space"] { background: #9fc3dc; }
:root[data-look="space"] body { background: transparent; color: var(--ink); }
:root[data-look="space"] body::before { content: ""; position: fixed; inset: 0; z-index: -1; background: url("/bg/sky-desk.webp") center / cover no-repeat; }
:root[data-look="space"] h1, :root[data-look="space"] .side-brand b, :root[data-look="space"] .bar b { font-family: Georgia, "Times New Roman", serif; font-weight: 500; letter-spacing: -.03em; }
:root[data-look="space"] .card { background: var(--card); border: 1px solid var(--g-edge); border-radius: 26px;
  -webkit-backdrop-filter: blur(23px) saturate(120%); backdrop-filter: blur(23px) saturate(120%);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, .55), inset 0 -1px 1px rgba(255, 255, 255, .2), var(--g-shadow); }
:root[data-look="space"] .card.unheard { border-left: 6px solid var(--red); }
:root[data-look="space"] .card.answered { border-left: 6px solid var(--green); }
:root[data-look="space"] button, :root[data-look="space"] .btn { background: rgba(255, 255, 255, .62); color: var(--ink); border: 1px solid var(--g-edge); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7); }
:root[data-look="space"] button.primary, :root[data-look="space"] .btn.primary { background: linear-gradient(130deg, #5fa8dd, #2776b6); color: #fff; border: 0; box-shadow: 0 8px 20px rgba(39, 118, 182, .32), inset 0 1px 1px rgba(255, 255, 255, .5); }
:root[data-look="space"] button.link { background: none; border: 0; box-shadow: none; color: var(--brand); }
:root[data-look="space"] button.sel, :root[data-look="space"] .answers button.sel { background: var(--accent-light); border-color: var(--brand); }
:root[data-look="space"] input, :root[data-look="space"] select, :root[data-look="space"] textarea { background: rgba(255, 255, 255, .66); color: var(--ink); border: 1px solid var(--g-edge); }
:root[data-look="space"] .tag { background: rgba(39, 118, 182, .12); color: var(--ink); }
:root[data-look="space"] .big-btn { border-radius: 30px; border: 1px solid var(--g-edge); box-shadow: inset 0 1px 2px rgba(255, 255, 255, .7), var(--g-shadow); }
:root[data-look="space"] .big-btn.inbox { background: linear-gradient(130deg, #c9e9ff, #2776b6 70%); color: #fff; }
:root[data-look="space"] .big-btn.send { background: linear-gradient(150deg, rgba(42, 82, 112, .88), rgba(21, 44, 61, .92)); color: #fff; }
:root[data-look="space"] .tabs { background: var(--g-sheet); border: 1px solid var(--g-edge); box-shadow: inset 0 1px 1px rgba(255, 255, 255, .55), var(--g-shadow);
  -webkit-backdrop-filter: blur(23px) saturate(120%); backdrop-filter: blur(23px) saturate(120%); }
:root[data-look="space"] .tabs button { background: none; border: 0; box-shadow: none; color: var(--mute); }
:root[data-look="space"] .tabs button.on { background: linear-gradient(130deg, var(--accent-light), var(--brand)); color: #fff; box-shadow: inset 0 1px 2px #fff, 0 4px 12px rgba(42, 80, 115, .2); }
:root[data-look="space"] .tabs button.on .badge { background: #fff; color: var(--red); }
:root[data-look="space"] .cols button.on { color: var(--ink); box-shadow: inset 0 -3px 0 var(--brand); }
:root[data-look="space"] .peek { background: none; border: 0; border-top: 1px solid rgba(21, 44, 61, .12); box-shadow: none; }
:root[data-look="space"] .lane { background: rgba(235, 246, 255, .30); border: 1px solid rgba(255, 255, 255, .6);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
:root[data-look="space"] .lane-head { background: transparent; }
:root[data-look="space"] .bar .link, :root[data-look="space"] .fontbar { text-shadow: 0 1px 10px rgba(255, 255, 255, .9); }
:root[data-look="space"] .empty { color: var(--ink); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :root[data-look="space"] .card, :root[data-look="space"] .tabs { background: #e6f2fb; }
}
/* words that sit straight on the photo get a soft light halo, the way My Space's greeting does; the top tools sit on a small glass pill */
:root[data-look="space"] h1 { text-shadow: 0 0 18px #edf8ff, 0 0 6px #edf8ff; }
:root[data-look="space"] .bar > div:last-child, :root[data-look="space"] .fontbar { background: rgba(235, 246, 255, .72); border: 1px solid var(--g-edge); border-radius: 999px; padding: 0 10px;
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); text-shadow: none; }
:root[data-look="space"] .fontbar { display: inline-flex; align-items: center; padding: 0 6px 0 14px; }
:root[data-look="space"] .inbox-top .fontbar { color: var(--ink); }
:root[data-look="space"] .bar > div:first-child { text-shadow: 0 0 14px #edf8ff, 0 0 5px #edf8ff, 0 0 2px #fff; }
:root[data-look="space"] .bar > div:first-child .mute { color: var(--ink); }
/* the More link under the home tiles: a glass pill so it reads on any part of the photo */
:root[data-look="space"] .v-home > div > button.link:last-child { background: rgba(235, 246, 255, .78); border: 1px solid var(--g-edge); border-radius: 999px; padding: 8px 20px;
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
@media (min-width: 1000px) { #app:not(.v-inbox) > .bar { max-width: none; } }
:root[data-look="space"] h2, :root[data-look="space"] label { color: var(--ink); text-shadow: 0 0 14px #edf8ff, 0 0 5px #edf8ff, 0 0 2px #fff; }

/* ---------- 3. the Chat look: flat green and white, the way a chat app looks (Toms 2026-11-23, «类似 whatsapp»). Our own colours and no
   borrowed logo or wallpaper; light and dark follow the phone. Red stays the colour of what is new and waiting. ---------- */
:root[data-look="chat"] {
  --bg: #efeae2; --card: #ffffff; --ink: #111b21; --mute: #667781; --line: #e9edef;
  --brand: #008069; --brand-ink: #ffffff; --soft: rgba(0, 128, 105, .10); --mine: #d9fdd3; --head: #008069; --head-ink: #ffffff;
  --rail: #ffffff; --rail-on: #e7f6f1; --pane: #f0f2f5; --shadow: 0 1px .5px rgba(11, 20, 26, .13);
  color-scheme: light;
}
/* dark: by the phone (Auto) unless the person chose Light, or always when they chose Dark (More › Light or dark, 2026-11-23) */
@media (prefers-color-scheme: dark) {
  :root[data-look="chat"]:not([data-scheme="light"]) {
    --bg: #0b141a; --card: #202c33; --ink: #e9edef; --mute: #8696a0; --line: #2a3942;
    --brand: #00a884; --brand-ink: #0b141a; --soft: rgba(0, 168, 132, .16); --mine: #005c4b; --head: #202c33; --head-ink: #e9edef;
    --rail: #111b21; --rail-on: #2a3942; --pane: #111b21; --shadow: 0 1px .5px rgba(0, 0, 0, .35); --dots: rgba(255, 255, 255, .03);
    color-scheme: dark;
  }
}
:root[data-look="chat"][data-scheme="dark"] {
  --bg: #0b141a; --card: #202c33; --ink: #e9edef; --mute: #8696a0; --line: #2a3942;
  --brand: #00a884; --brand-ink: #0b141a; --soft: rgba(0, 168, 132, .16); --mine: #005c4b; --head: #202c33; --head-ink: #e9edef;
  --rail: #111b21; --rail-on: #2a3942; --pane: #111b21; --shadow: 0 1px .5px rgba(0, 0, 0, .35); --dots: rgba(255, 255, 255, .03);
  color-scheme: dark;
}
:root[data-look="chat"] { background: var(--bg); }
:root[data-look="chat"] body { background: var(--bg); color: var(--ink);
  background-image: radial-gradient(var(--dots, rgba(0, 0, 0, .035)) 1px, transparent 1.2px); background-size: 18px 18px; background-attachment: fixed; }
/* flat: no glass blur anywhere in this look */
:root[data-look="chat"] .card, :root[data-look="chat"] .tabs, :root[data-look="chat"] button, :root[data-look="chat"] .btn,
:root[data-look="chat"] input, :root[data-look="chat"] select, :root[data-look="chat"] textarea, :root[data-look="chat"] .lane { -webkit-backdrop-filter: none; backdrop-filter: none; }
:root[data-look="chat"] h1 { font-weight: 600; letter-spacing: -.2px; }
:root[data-look="chat"] .card { background: var(--card); border: 0; border-radius: 10px; box-shadow: var(--shadow); padding: 12px 14px; }
:root[data-look="chat"] .card.unheard { border-left: 5px solid var(--red); }
:root[data-look="chat"] .card.answered { border-left: 5px solid var(--brand); opacity: .82; }
:root[data-look="chat"] .card.mine, :root[data-look="chat"] .chat-line.mine { background: var(--mine); }
:root[data-look="chat"] .chat-line { border: 0; box-shadow: var(--shadow); border-radius: 10px; }
:root[data-look="chat"] button, :root[data-look="chat"] .btn { background: var(--card); color: var(--brand); border: 1px solid var(--line); border-radius: 22px; box-shadow: none; font-weight: 600; }
:root[data-look="chat"] button.primary, :root[data-look="chat"] .btn.primary { background: var(--brand); color: var(--brand-ink); border: 0; box-shadow: none; }
:root[data-look="chat"] button.link { background: none; border: 0; color: var(--brand); }
:root[data-look="chat"] button.sel, :root[data-look="chat"] .answers button.sel { background: var(--soft); border-color: var(--brand); color: var(--ink); }
:root[data-look="chat"] input, :root[data-look="chat"] select, :root[data-look="chat"] textarea { background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 10px; box-shadow: none; }
:root[data-look="chat"] input:focus, :root[data-look="chat"] select:focus, :root[data-look="chat"] textarea:focus { outline: 2px solid var(--brand); outline-offset: 0; }
:root[data-look="chat"] .tag { background: var(--soft); color: var(--brand); }
:root[data-look="chat"] .cols { background: var(--card); border-radius: 10px; box-shadow: var(--shadow); border: 0; overflow: hidden; }
:root[data-look="chat"] .cols button { border: 0; border-radius: 0; background: none; color: var(--mute); }
:root[data-look="chat"] .cols button.on { color: var(--brand); box-shadow: inset 0 -3px 0 var(--brand); }
/* the top bar is the green band of a chat app, edge to edge on a phone */
:root[data-look="chat"] .bar { background: var(--head); color: var(--head-ink); margin: 0 -16px 10px; padding: 12px 16px; padding-top: calc(12px + env(safe-area-inset-top)); }
:root[data-look="chat"] .bar .mute { color: var(--head-ink); opacity: .85; }
:root[data-look="chat"] .bar button.link { color: var(--head-ink); }
/* home tiles: green and deep green */
:root[data-look="chat"] .big-btn { border-radius: 16px; border: 0; box-shadow: var(--shadow); }
:root[data-look="chat"] .big-btn.inbox { background: #008069; color: #fff; }
:root[data-look="chat"] .big-btn.send { background: #075e54; color: #fff; }
:root[data-look="chat"] .peek { background: none; border: 0; border-top: 1px solid var(--line); box-shadow: none; color: var(--ink); border-radius: 0; font-weight: 400; }
:root[data-look="chat"] .peek-head .link { color: var(--brand); }
/* phone dock: a plain white bar with a green line under the open tab */
:root[data-look="chat"] .tabs { background: var(--rail); border: 0; border-top: 1px solid var(--line); box-shadow: 0 -1px 3px rgba(11, 20, 26, .06); left: 0; right: 0; bottom: 0; border-radius: 0; padding-bottom: env(safe-area-inset-bottom); }
:root[data-look="chat"] .tabs button { background: none; border: 0; border-radius: 0; color: var(--mute); }
:root[data-look="chat"] .tabs button.on { color: var(--brand); background: var(--rail-on); }
:root[data-look="chat"] #app { padding-bottom: calc(92px + env(safe-area-inset-bottom)); }
:root[data-look="chat"] .micbar { margin: 0 -16px; border-radius: 0; }
@media (min-width: 1000px) {
  /* a computer: white rail on the left, a pale pane behind the three columns */
  :root[data-look="chat"] .tabs { top: 0; bottom: 0; left: 0; width: 250px; border-radius: 0; border: 0; border-right: 1px solid var(--line); box-shadow: none; padding: 0 10px 12px; }
  :root[data-look="chat"] .side-brand { background: var(--head); color: var(--head-ink); margin: 0 -10px 10px; padding: 18px 22px 16px; }
  :root[data-look="chat"] .side-brand .mute { color: var(--head-ink); opacity: .85; }
  :root[data-look="chat"] .tabs button, :root[data-look="chat"] .tabs .side-brand + button, :root[data-look="chat"] .tabs .side-brand + button + button { border-radius: 10px; }
  :root[data-look="chat"] #app { margin-left: 274px; padding-bottom: 32px; }
  :root[data-look="chat"] .bar { background: none; color: var(--ink); margin: 0; padding: 4px 0 0; }
  :root[data-look="chat"] .bar button.link { color: var(--brand); }
  :root[data-look="chat"] .lane { background: var(--pane); border: 0; border-radius: 12px; box-shadow: var(--shadow); }
  :root[data-look="chat"] .lane-head { background: var(--pane); }
}

/* ---------- 4. the Inbox as a tidy list (Toms 2026-11-23): one line per note, tap to open and decide ---------- */
.ilist { margin: 6px 0 12px; border-radius: 14px; overflow: hidden; background: var(--card); border: 1px solid var(--line); }
.irow { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; width: 100%; text-align: left; margin: 0; min-height: 64px;
  padding: 10px 14px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: none; box-shadow: none; font-weight: 400; color: var(--ink);
  -webkit-backdrop-filter: none; backdrop-filter: none; }
.irow:last-child { border-bottom: 0; }
.irow-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; min-width: 0; }
.irow-who { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.irow.new .irow-who { font-weight: 800; }
.irow-who .dot { width: 9px; height: 9px; margin-right: 7px; }
.irow-when { flex: none; font-size: 12px; }
.irow.new .irow-when { color: var(--red); font-weight: 700; }
.irow-text { color: var(--mute); font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.irow.new .irow-text { color: var(--ink); }
.irow-done { font-size: 12px; color: var(--green); font-weight: 600; }
.irow.gone { opacity: .55; }
.irow.on { background: var(--soft); }
.iback { margin: 4px 0 2px; font-size: 16px; }
@media (min-width: 1000px) {
  .ipanes { display: grid; grid-template-columns: minmax(320px, 400px) minmax(0, 1fr); gap: 18px; align-items: start; }
  .ileft { position: sticky; top: 10px; max-height: calc(100vh - 110px); display: flex; flex-direction: column; min-height: 0; }
  .ileft .cols { flex: none; margin: 0 0 8px; }
  .ileft .ilist { flex: 1; overflow-y: auto; overscroll-behavior: contain; margin: 0; }
  .ireader { min-width: 0; max-width: 820px; }
  .ireader .card { margin-top: 0; }
  .ireader .msg { font-size: calc(var(--fs) + 4px); }
  .ipick { padding: 80px 20px; }
}
/* the Chat look's list: white rows, the open one pale green, like a chat app's list */
:root[data-look="chat"] .ilist { border: 0; border-radius: 10px; box-shadow: var(--shadow); }
:root[data-look="chat"] .irow { background: var(--card); color: var(--ink); border-radius: 0; border: 0; border-bottom: 1px solid var(--line); font-weight: 400; }
:root[data-look="chat"] .irow.on { background: var(--rail-on); }
:root[data-look="chat"] .irow.new .irow-when { color: var(--brand); }
:root[data-look="space"] .irow { background: none; border: 0; border-bottom: 1px solid rgba(21, 44, 61, .1); border-radius: 0; box-shadow: none; color: var(--ink); }
:root[data-look="space"] .ilist { background: var(--card); -webkit-backdrop-filter: blur(23px); backdrop-filter: blur(23px); }
