/* Ask Ace's empty table in every School (school-chat-flavor.js). Only while a conversation is empty, only in Ask Ace;
   the chat box itself is unchanged. Colours come from the School's own room: --room-accent, --room-ink, --room-muted. */
.scf { display: none }
html body.aw-native-school.aw-school-universe[data-school-category="chat"] #p-chat:not(:has(#chat .msg)) > .scf {
  --scf-accent: var(--room-accent, #3d5f8a);
  --scf-ink: var(--room-ink, #111);
  --scf-muted: var(--room-muted, #667);
  --scf-face: linear-gradient(170deg, #fffefb 0%, #f7f4ec 100%);
  --scf-face-ink: #14161a;
  --scf-face-muted: #5d6470;
  --scf-shadow: 0 1px 0 #fff inset, 0 14px 28px rgba(16, 20, 28, .14), 0 2px 6px rgba(16, 20, 28, .08);
  position: relative; isolation: isolate; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; box-sizing: border-box; min-height: 100%; width: min(100%, 760px); margin: 0 auto; padding: 8px 0 6px; text-align: center
}
html[data-school-theme="dark"] body.aw-native-school.aw-school-universe[data-school-category="chat"] #p-chat:not(:has(#chat .msg)) > .scf {
  --scf-face: linear-gradient(170deg, #1b1c20 0%, #0a0a0c 100%);
  --scf-face-ink: #f5f3ee;
  --scf-face-muted: #a7a39a;
  --scf-shadow: 0 1px 0 #ffffff14 inset, 0 16px 30px #000c, 0 2px 6px #0008
}
/* The emblem: engraved metal on lacquer, a soft key light and a glint that passes every few seconds. */
.scf-emblem {
  position: relative; width: clamp(76px, 18vw, 104px); aspect-ratio: 1; margin-bottom: 6px; border-radius: 26%;
  filter: drop-shadow(0 14px 22px color-mix(in srgb, var(--scf-accent) 30%, transparent)) drop-shadow(0 3px 6px #0003)
}
.scf-emblem > svg:not(.scf-rosette) { position: relative; display: block; width: 100%; height: 100% }
/* A guilloché rosette in the School's colour, faint and slowly turning behind the emblem. */
.scf-rosette { position: absolute; z-index: -1; left: 50%; top: 50%; width: 205%; height: 205%; translate: -50% -50%; -webkit-mask-image: radial-gradient(closest-side, #000 52%, transparent 100%); mask-image: radial-gradient(closest-side, #000 52%, transparent 100%); fill: none; stroke: var(--scf-accent); stroke-width: .32; opacity: .32; animation: scf-turn 140s linear infinite; pointer-events: none }
html[data-school-theme="dark"] .scf-rosette { opacity: .42 }
@keyframes scf-turn { to { rotate: 360deg } }
.scf-emblem.scf-heart { width: clamp(108px, 24vw, 148px); border-radius: 0; filter: drop-shadow(0 14px 25px #ae1d4922) }
.scf-glint {
  position: absolute; inset: 0; border-radius: inherit; overflow: hidden; pointer-events: none;
  -webkit-mask: linear-gradient(#000 0 0); mask: linear-gradient(#000 0 0)
}
.scf-emblem:not(.scf-heart) .scf-glint::after {
  content: ""; position: absolute; inset: -40% -60%; translate: -70% 0;
  background: linear-gradient(105deg, transparent 42%, #ffffff66 50%, transparent 58%);
  animation: scf-glint 6.5s ease-in-out 1.2s infinite
}
@keyframes scf-glint { 0%, 78% { translate: -70% 0 } 100% { translate: 70% 0 } }
.scf-eyebrow { margin: 0; font: 700 11px/1.4 system-ui, -apple-system, sans-serif; letter-spacing: .26em; text-transform: uppercase; color: var(--scf-accent) }
html[data-school-theme="dark"] .scf-eyebrow { color: color-mix(in srgb, var(--scf-accent) 55%, #fff) }
.scf-title { margin: 2px 0 0; max-width: 18ch; font: 700 clamp(26px, 6.2vw, 40px)/1.08 system-ui, -apple-system, sans-serif; letter-spacing: -.02em; color: var(--scf-ink); text-wrap: balance }
.scf-line { margin: 4px 0 0; max-width: 36ch; font: 400 15px/1.45 system-ui, -apple-system, sans-serif; color: var(--scf-muted); text-wrap: balance }
/* A hand of four cards from the School's field, fanned and leaning with the pointer or the phone. */
.scf-hand {
  --w: clamp(90px, 24.5vw, 136px); --tx: 0; --ty: 0;
  position: relative; width: 100%; height: calc(var(--w) * 1.4 + 34px); margin-top: clamp(14px, 4vh, 34px);
  perspective: 900px; transform: rotateY(calc(var(--tx) * 8deg)) rotateX(calc(var(--ty) * -6deg)); transition: transform .4s cubic-bezier(.3, 1.2, .5, 1)
}
.scf-card {
  position: absolute; left: 50%; bottom: 10px; width: var(--w); height: calc(var(--w) * 1.4); margin-left: calc(var(--w) / -2);
  transform-origin: 50% 115%; transform: translateX(calc(var(--off) * var(--w) * .8)) translateY(calc(abs(var(--off)) * 7px)) rotate(calc(var(--off) * 6.5deg));
  display: flex; flex-direction: column; justify-content: center; align-items: stretch; gap: 4px; padding: 0 calc(var(--w) * .2) 0 calc(var(--w) * .12); box-sizing: border-box; letter-spacing: normal; word-break: normal; overflow-wrap: normal;
  border: 1px solid color-mix(in srgb, var(--scf-accent) 38%, transparent); border-radius: calc(var(--w) * .1);
  background: var(--scf-face); color: var(--scf-face-ink); box-shadow: var(--scf-shadow); text-align: left; cursor: pointer;
  font: inherit; -webkit-tap-highlight-color: transparent; transition: translate .22s cubic-bezier(.3, 1.4, .5, 1), box-shadow .22s
}
@supports not (width: abs(1px)) {
  .scf-card { transform: translateX(calc(var(--off) * var(--w) * .8)) translateY(calc(max(var(--off), var(--off) * -1) * 7px)) rotate(calc(var(--off) * 6.5deg)) }
}
.scf-card::before { content: ""; position: absolute; inset: calc(var(--w) * .05); border-radius: calc(var(--w) * .07); border: .6px solid color-mix(in srgb, var(--scf-accent) 34%, transparent); pointer-events: none }
.scf-card::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(115deg, transparent 30%, #ffffff40 46%, transparent 60%); opacity: .55; pointer-events: none }
.scf-card:hover, .scf-card:focus-visible { translate: 0 -16px; z-index: 8 !important; outline: none; box-shadow: var(--scf-shadow), 0 0 0 2px color-mix(in srgb, var(--scf-accent) 70%, transparent) }
.scf-card b { position: relative; font: 700 calc(var(--w) * .13)/1.12 system-ui, -apple-system, sans-serif; letter-spacing: -.01em; hyphens: manual }
.scf-card:last-child { padding-right: calc(var(--w) * .12) }
.scf-card small { position: relative; font: 500 calc(var(--w) * .092)/1.25 system-ui, -apple-system, sans-serif; letter-spacing: normal; color: var(--scf-face-muted) }
.scf-rank { position: absolute; left: calc(var(--w) * .09); top: calc(var(--w) * .08); display: grid; justify-items: center; font: 700 calc(var(--w) * .15)/.95 Georgia, "Times New Roman", serif; color: var(--scf-accent) }
.scf-rank i { font: normal calc(var(--w) * .12)/1 system-ui; margin-top: 2px }
.scf-rank.scf-br { left: auto; top: auto; right: calc(var(--w) * .09); bottom: calc(var(--w) * .08); rotate: 180deg }
.scf-pip { position: absolute; right: calc(var(--w) * .1); top: calc(var(--w) * .16); font: calc(var(--w) * .42)/1 system-ui; color: var(--scf-accent); opacity: .1; pointer-events: none }
html[data-school-theme="dark"] .scf-rank { color: color-mix(in srgb, var(--scf-accent) 55%, #fff) }
html[data-school-theme="dark"] .scf-pip { color: color-mix(in srgb, var(--scf-accent) 50%, #fff); opacity: .14 }
/* Medicine's heart lives in the welcome while the table is empty, and returns as the faint watermark once you talk. */
html body.aw-native-school.aw-school-universe[data-school-category="chat"].scf-ready:has(#p-chat > .scf):not(:has(#chat .msg)) .su-med-heart { opacity: 0 !important }
@media (max-height: 640px) {
  .scf-emblem { width: 64px } .scf-emblem.scf-heart { width: 92px } .scf-line { display: none }
  .scf-hand { --w: clamp(84px, 23vw, 112px); margin-top: 10px }
}
@media (prefers-reduced-motion: reduce) {
  .scf-emblem .scf-glint::after, .scf-rosette { animation: none } .scf-hand, .scf-card { transition: none }
}

/* In the conversation (school-chat-flavor.js): Send is a gold casino chip that turns like a tossed coin when Talk
   becomes Send, each answer is signed with the School's suit, and your messages sit on a card tinted with its colour. */
html body.aw-native-school.aw-school-universe[data-school-category="chat"] #composer #send {
  position: relative; width: 48px !important; height: 48px !important; min-width: 48px !important; flex: 0 0 48px;
  border-radius: 50% !important; background: none !important; box-shadow: none !important; perspective: 420px
}
.scf-chip {
  position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, #1b1b1e 0 52%, transparent 53%), repeating-conic-gradient(from -5deg, #2a1d08 0 10deg, transparent 10deg 45deg),
    conic-gradient(#f7e3a1, #e8b845 12%, #a97a22 25%, #e8b845 37%, #f7e3a1 50%, #e8b845 62%, #a97a22 75%, #e8b845 87%, #f7e3a1);
  box-shadow: 0 6px 14px -4px #000b, inset 0 1px 0 #fff6
}
.scf-chip::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; border: 1.5px dashed #3d2a0bb3 }
.scf-chip::after { content: ""; position: absolute; inset: 11px; border-radius: 50%; background: radial-gradient(circle at 50% 35%, #232227, #050506); box-shadow: inset 0 2px 6px #000, inset 0 -1px 0 #f7e3a133 }
html body.aw-native-school.aw-school-universe[data-school-category="chat"] #composer #send > svg { position: relative; z-index: 1; width: 20px; height: 20px }
html body.aw-native-school.aw-school-universe[data-school-category="chat"] #composer #send > svg.send,
html body.aw-native-school.aw-school-universe[data-school-category="chat"] #composer #send > svg.send * { stroke: #f0d78a !important; color: #f0d78a !important; fill: none !important }
html body.aw-native-school.aw-school-universe[data-school-category="chat"] #composer #send:focus-visible { outline: 2px solid #e8b845; outline-offset: 3px }
html body.aw-native-school.aw-school-universe[data-school-category="chat"] #composer:focus-within { box-shadow: 0 0 0 1px color-mix(in srgb, var(--room-accent, #e8b845) 55%, transparent), 0 10px 30px -18px #000c }
html body.aw-native-school.aw-school-universe[data-school-category="chat"] #p-chat #chat .msg.ace::before {
  content: var(--scf-who, "\2660  ACE") !important; display: block !important; width: max-content; margin: 0 0 10px !important; padding: 0 !important;
  font: 800 10px/1.2 system-ui, -apple-system, sans-serif !important; letter-spacing: .22em !important; text-transform: uppercase !important;
  color: var(--room-accent, #a8781f) !important; background: none !important; text-shadow: none !important; border: 0 !important; position: static !important
}
html[data-school-theme="dark"] body.aw-native-school.aw-school-universe[data-school-category="chat"] #p-chat #chat .msg.ace::before { color: color-mix(in srgb, var(--room-accent, #e8b845) 55%, #fff) !important }
html body.aw-native-school.aw-school-universe[data-school-category="chat"] #p-chat #chat :is(.msg.me, .msg.user) {
  background: color-mix(in srgb, var(--room-accent, #e8b845) 11%, var(--chat-bubble, #f2f2f2)) !important;
  border: 1px solid color-mix(in srgb, var(--room-accent, #e8b845) 28%, transparent) !important; border-radius: 18px 18px 6px 18px !important;
  box-shadow: 0 8px 18px -14px color-mix(in srgb, var(--room-accent, #000) 70%, transparent) !important
}
@media (prefers-reduced-motion: reduce) { .scf-chip { transition: none } }

/* ---------- Ask Ace at the iPhone's level of detail (school-chat-flavor.js part two) ----------
   One table for every School: the bar (its name picks how Ace answers, All chats, New chat), the composer's + and camera
   and hold-to-dictate, the Study tab, sheets dealt up from the table, the action row under every answer, follow-ups under
   the latest one, and the workbench. Colours come from the School's room: --room-accent, --room-ink, --room-muted. */
body.scx-on {
  --scx-accent: var(--room-accent, #3d5f8a); --scx-ink: var(--room-ink, #182637); --scx-muted: var(--room-muted, #506174);
  --scx-line: var(--room-line, #d9e1eb); --scx-raised: var(--room-raised, #f7f7f8);
  --scx-face: linear-gradient(170deg, #fffefb 0%, #f6f2e8 100%); --scx-face-ink: #14161a; --scx-face-muted: #5d6470;
  --scx-sheet: #fbfaf7; --scx-glass: color-mix(in srgb, #fff 78%, transparent);
  --scx-gold: linear-gradient(135deg, #f7e3a1, #e8b845 38%, #a97a22 72%, #f0cf73);
  --scx-spring: cubic-bezier(.34, 1.4, .64, 1)
}
html[data-school-theme="dark"] body.scx-on {
  --scx-face: linear-gradient(170deg, #1d1e23 0%, #0b0b0d 100%); --scx-face-ink: #f5f3ee; --scx-face-muted: #a7a39a;
  --scx-sheet: #121317; --scx-glass: color-mix(in srgb, #000 70%, transparent);
  --scx-accent: color-mix(in srgb, var(--room-accent, #3d5f8a) 60%, #fff)
}
.scx-i { display: block; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round }
.scx-q { display: block; flex: none; width: 1em; height: .78em; font-family: Georgia, "Times New Roman", serif; font-weight: 700; line-height: 1; text-align: center; overflow: visible }

/* Only in Ask Ace. */
body:not([data-school-category="chat"]) :is(.scx-bar, .scx-study-tab, .scx-latest, .scx-toast) { display: none !important }

/* The bar: the School's name in the middle picks how Ace answers; All chats and New chat on the right. */
.scx-bar { position: absolute; z-index: 25; top: 0; left: 0; right: 0; height: 68px; padding: 0 12px 0 68px; box-sizing: border-box; display: flex; align-items: center; justify-content: center; pointer-events: none; transition: background .25s, box-shadow .25s }
.scx-bar > * { pointer-events: auto }
.scx-bar.under { background: var(--scx-glass); -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4); box-shadow: 0 1px 0 color-mix(in srgb, var(--scx-line) 80%, transparent) }
.scx-title { display: inline-flex; align-items: center; gap: 7px; max-width: calc(100% - 100px); height: 40px; padding: 0 12px 0 14px; border: 1px solid transparent; border-radius: 20px; background: none; color: var(--scx-ink); font: 700 16px/1 system-ui, -apple-system, sans-serif; letter-spacing: -.01em; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background .2s, border-color .2s }
.scx-title:hover, .scx-title:focus-visible { outline: none; background: color-mix(in srgb, var(--scx-accent) 8%, transparent); border-color: color-mix(in srgb, var(--scx-accent) 26%, transparent) }
.scx-title b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 800 }
.scx-title b span { font-weight: 600 }
.scx-suit { color: var(--scx-accent); font-size: 15px }
.scx-title em { font: 800 9.5px/1 system-ui, -apple-system, sans-serif; letter-spacing: .14em; text-transform: uppercase; font-style: normal; padding: 5px 7px 4px; border-radius: 9px; color: #2a1d08; background: var(--scx-gold); box-shadow: inset 0 1px 0 #fff8 }
.scx-title .scx-i { color: var(--scx-muted) }
.scx-bar-r { position: absolute; right: 10px; top: 12px; display: flex; gap: 4px }
.scx-ib { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: none; color: var(--scx-ink); cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background .2s, transform .2s var(--scx-spring) }
.scx-ib:hover, .scx-ib:focus-visible { outline: none; background: color-mix(in srgb, var(--scx-accent) 10%, transparent) }
.scx-ib:active { transform: scale(.9) }
@media (max-width: 420px) { .scx-title b span { display: none } .scx-title { padding: 0 10px } }
html body.aw-native-school.scx-on[data-school-category="chat"] #chat:has(.msg) { padding-top: 58px }

/* The welcome's greeting and a card icon (the iPhone's "Good morning"). */
.scf-greet { margin: 2px 0 -2px; font: 500 17px/1.3 system-ui, -apple-system, sans-serif; color: var(--scx-muted) }
.scf-icon { position: relative; color: var(--scx-accent); margin-bottom: 2px }
.scf-icon .scx-i { width: calc(var(--w) * .17); height: calc(var(--w) * .17) }

/* The composer: the box on top; + and the camera on the left, the mic and Send on the right. */
html body.aw-native-school.scx-on[data-school-category="chat"] #composer { flex-wrap: wrap; align-items: stretch; row-gap: 4px; position: relative; padding-bottom: 8px }
html body.aw-native-school.scx-on[data-school-category="chat"] #composer > #say { flex: 1 1 100%; width: 100%; min-height: 44px }
.scx-tray { flex: 1 1 100%; display: grid; gap: 6px; min-width: 0 }
.scx-tray:not(:has(> :not([hidden]))) { display: none }
.scx-tools { flex: 1 1 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px }
.scx-tools-l, .scx-tools-r { display: flex; align-items: center; gap: 8px }
.scx-round { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border: 1px solid var(--scx-line); border-radius: 50%; background: color-mix(in srgb, var(--scx-raised) 70%, transparent); color: var(--scx-ink); cursor: pointer; -webkit-tap-highlight-color: transparent; transition: transform .25s var(--scx-spring), background .2s, border-color .2s, color .2s }
.scx-round:hover, .scx-round:focus-visible { outline: none; border-color: color-mix(in srgb, var(--scx-accent) 55%, transparent); color: var(--scx-accent) }
.scx-round:active { transform: scale(.9) }
.scx-add .scx-i { transition: rotate .35s var(--scx-spring) }
.scx-add.x { position: relative; z-index: 76; border-color: transparent; background: var(--scx-gold); color: #2a1d08; box-shadow: 0 8px 18px -8px #a97a22, inset 0 1px 0 #fff8 }
.scx-add.x .scx-i { rotate: 45deg }
.scx-mic { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; touch-action: none }
.scx-mic.on { border-color: transparent; background: var(--scx-gold); color: #2a1d08; animation: scx-breathe 1.4s ease-in-out infinite }
@keyframes scx-breathe { 50% { box-shadow: 0 0 0 7px color-mix(in srgb, #e8b845 22%, transparent) } }

/* A quoted passage and an attached photo ride above the box. */
.scx-quote, .scx-photo { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 8px 8px 8px 12px; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--scx-accent) 30%, transparent); background: color-mix(in srgb, var(--scx-accent) 7%, transparent); color: var(--scx-ink); animation: scx-up .38s var(--scx-spring) both }
.scx-quote[hidden], .scx-photo[hidden] { display: none }
.scx-quote > .scx-i { color: var(--scx-accent) }
.scx-quote > span, .scx-photo > span { flex: 1; min-width: 0; font: 13px/1.35 system-ui, -apple-system, sans-serif; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden }
.scx-quote small, .scx-photo small { display: block; font: 700 10px/1.3 system-ui; letter-spacing: .12em; text-transform: uppercase; color: var(--scx-accent) }
.scx-photo small { font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--scx-muted) }
.scx-photo b { display: block; font: 700 13px/1.3 system-ui }
.scx-photo img { width: 46px; height: 46px; object-fit: cover; border-radius: 9px; box-shadow: 0 4px 10px -4px #0006 }
.scx-quote > button, .scx-photo > button { display: grid; place-items: center; width: 30px; height: 30px; flex: none; border: 0; border-radius: 50%; background: color-mix(in srgb, var(--scx-ink) 8%, transparent); color: var(--scx-ink); cursor: pointer }
@keyframes scx-up { from { opacity: 0; translate: 0 10px } }

/* Jump to the latest answer. */
.scx-latest { position: absolute; z-index: 5; left: 50%; top: -48px; translate: -50% 0; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border: 1px solid color-mix(in srgb, #e8b845 55%, transparent); border-radius: 18px; background: var(--scx-sheet); color: var(--scx-ink); font: 700 13px/1 system-ui, -apple-system, sans-serif; box-shadow: 0 10px 24px -10px #0007; cursor: pointer; animation: scx-up .3s var(--scx-spring) both }
.scx-latest[hidden] { display: none }

/* The Study tab on the table's edge (the iPhone's ♠ STUDY). */
.scx-study-tab { position: absolute; z-index: 20; left: 0; top: 50%; translate: 0 -50%; display: grid; justify-items: center; gap: 8px; width: 30px; padding: 14px 0; border: 0; border-radius: 0 14px 14px 0; background: var(--scx-gold); color: #2a1d08; box-shadow: 0 10px 22px -10px #a97a22, inset -1px 0 0 #fff6; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: width .25s var(--scx-spring) }
.scx-study-tab b { writing-mode: vertical-rl; rotate: 180deg; font: 800 11px/1 system-ui, -apple-system, sans-serif; letter-spacing: .26em; text-transform: uppercase }
.scx-study-tab span { font-size: 13px }
.scx-study-tab:hover, .scx-study-tab:focus-visible { width: 36px; outline: none }
@media (max-width: 700px) { body.scx-on:has(#chat .msg) .scx-study-tab { display: none } }

/* Sheets: a card dealt up from the table. */
.scx-scrim { position: fixed; z-index: 80; inset: 0; display: flex; align-items: flex-end; justify-content: center; background: color-mix(in srgb, #06080c 46%, transparent); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: scx-fade .22s ease both }
.scx-scrim.out { animation: scx-fade .22s ease reverse both }
@keyframes scx-fade { from { opacity: 0 } }
.scx-sheet { position: relative; box-sizing: border-box; width: 100%; max-height: min(88vh, 860px); overflow: auto; overscroll-behavior: contain; padding: 22px 20px calc(22px + env(safe-area-inset-bottom)); border-radius: 26px 26px 0 0; background: var(--scx-sheet); color: var(--scx-ink); border: 1px solid color-mix(in srgb, #e8b845 40%, transparent); border-bottom: 0; box-shadow: 0 -24px 60px -20px #000a, inset 0 1px 0 #fff3; animation: scx-deal .46s var(--scx-spring) both; font: 15px/1.45 system-ui, -apple-system, sans-serif; outline: none }
.scx-sheet::before { content: ""; position: absolute; inset: 6px; border-radius: 21px 21px 0 0; border: .6px solid color-mix(in srgb, var(--scx-accent) 26%, transparent); border-bottom: 0; pointer-events: none }
.scx-scrim.out .scx-sheet { animation: scx-deal .24s ease-in reverse both }
@keyframes scx-deal { from { translate: 0 60%; opacity: .2 } }
@media (min-width: 720px) {
  .scx-scrim { align-items: center }
  .scx-sheet { width: min(520px, calc(100% - 48px)); border-radius: 26px; border-bottom: 1px solid color-mix(in srgb, #e8b845 40%, transparent); padding-bottom: 24px; box-shadow: 0 40px 90px -30px #000c }
  .scx-sheet::before { border-radius: 21px; border-bottom: .6px solid color-mix(in srgb, var(--scx-accent) 26%, transparent) }
  .scx-sheet.wide { width: min(760px, calc(100% - 48px)) }
  @keyframes scx-deal { from { translate: 0 30px; scale: .96; opacity: 0 } }
}
.scx-grab { width: 40px; height: 5px; margin: -10px auto 12px; border-radius: 3px; background: color-mix(in srgb, var(--scx-ink) 18%, transparent) }
@media (min-width: 720px) { .scx-grab { display: none } }
.scx-x { position: absolute; top: 12px; right: 12px; display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 50%; background: color-mix(in srgb, var(--scx-ink) 7%, transparent); color: var(--scx-ink); cursor: pointer }
.scx-sheet h2 { margin: 2px 44px 14px 0; font: 750 24px/1.15 system-ui, -apple-system, sans-serif; letter-spacing: -.02em }
.scx-sheet h3 { display: flex; align-items: baseline; justify-content: space-between; margin: 22px 0 8px; font: 800 11px/1.2 system-ui; letter-spacing: .18em; text-transform: uppercase; color: var(--scx-accent) }
.scx-sheet h3 small { font: 600 12px/1 system-ui; letter-spacing: 0; text-transform: none; color: var(--scx-muted) }
.scx-eyebrow { margin: 0; font: 800 10.5px/1.4 system-ui, -apple-system, sans-serif; letter-spacing: .24em; text-transform: uppercase; color: var(--scx-accent) }
.scx-fine { margin: 10px 0 0; font: 13px/1.45 system-ui, -apple-system, sans-serif; color: var(--scx-muted) }
.scx-row { display: flex; align-items: center; gap: 8px; margin-top: 12px }
.scx-row.wrap { flex-wrap: wrap }
.scx-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 0 15px; border: 1px solid var(--scx-line); border-radius: 20px; background: color-mix(in srgb, var(--scx-raised) 80%, transparent); color: var(--scx-ink); font: 650 14px/1 system-ui, -apple-system, sans-serif; text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: transform .22s var(--scx-spring), border-color .2s }
.scx-btn:hover, .scx-btn:focus-visible { outline: none; border-color: color-mix(in srgb, var(--scx-accent) 55%, transparent) }
.scx-btn:active { transform: scale(.95) }
.scx-btn.gold { border-color: transparent; background: var(--scx-gold); color: #241806; box-shadow: 0 8px 18px -10px #a97a22, inset 0 1px 0 #fff8 }
.scx-sheet > .scx-btn.gold { width: 100%; margin-top: 16px }

/* How Ace answers. */
.scx-level { position: relative; display: flex; align-items: center; gap: 14px; width: 100%; margin-top: 10px; padding: 16px; text-align: left; border: 1px solid var(--scx-line); border-radius: 18px; background: var(--scx-face); color: var(--scx-face-ink); cursor: pointer; font: inherit; transition: transform .25s var(--scx-spring), border-color .2s }
.scx-level.on { border-color: #e8b845; box-shadow: 0 0 0 1px #e8b845, 0 12px 26px -16px #a97a22 }
.scx-level:active { transform: scale(.98) }
.scx-level > div { flex: 1; display: grid; gap: 2px }
.scx-level b { font: 750 17px/1.2 system-ui } .scx-level span { font-size: 14px } .scx-level small { font-size: 12.5px; color: var(--scx-face-muted) }
.scx-level > .scx-i { color: #a97a22 }
.scx-rk { display: grid; justify-items: center; flex: none; font: 700 20px/.95 Georgia, "Times New Roman", serif; color: var(--scx-accent) }
.scx-rk i { font: normal 15px/1 system-ui; margin-top: 2px }
.scx-rk.mini { width: 26px; font-size: 15px } .scx-rk.mini i { font-size: 11px }

/* All chats and decks. */
.scx-chats, .scx-decks { display: grid; gap: 8px; margin-top: 4px }
.scx-decks { margin-top: 16px }
.scx-chat { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; text-align: left; border: 1px solid var(--scx-line); border-radius: 16px; background: var(--scx-face); color: var(--scx-face-ink); font: inherit; cursor: pointer; transition: transform .22s var(--scx-spring), border-color .2s }
.scx-chat:hover, .scx-chat:focus-visible { outline: none; border-color: color-mix(in srgb, var(--scx-accent) 50%, transparent); transform: translateX(3px) }
.scx-chat > span:last-child { min-width: 0; display: grid; gap: 2px }
.scx-chat b { font: 650 15px/1.3 system-ui; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.scx-chat small { font: 12.5px/1.2 system-ui; color: var(--scx-face-muted) }
.scx-chat.now { border-color: #e8b845 }

/* Playing cards: the + hand and Pick a card. */
.scx-pc { position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: 3px; box-sizing: border-box; padding: 12px 12px 30px; text-align: left; border: 1px solid color-mix(in srgb, var(--scx-accent) 40%, transparent); border-radius: 12px; background: var(--scx-face); color: var(--scx-face-ink); box-shadow: 0 1px 0 #fff inset, 0 14px 28px rgba(16,20,28,.18), 0 2px 6px rgba(16,20,28,.1); font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: translate .22s var(--scx-spring), box-shadow .22s }
.scx-pc::before { content: ""; position: absolute; inset: 5px; border-radius: 8px; border: .6px solid color-mix(in srgb, var(--scx-accent) 32%, transparent); pointer-events: none }
.scx-pc::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(115deg, transparent 30%, #ffffff40 46%, transparent 60%); opacity: .5; pointer-events: none }
.scx-pc .scx-rk { position: absolute; left: 9px; top: 8px; font-size: 17px } .scx-pc .scx-rk i { font-size: 12px }
.scx-pc .scx-rk.br { left: auto; top: auto; right: 9px; bottom: 8px; rotate: 180deg }
.scx-pc > .scx-i { color: var(--scx-accent); margin-bottom: 4px }
.scx-pc b { position: relative; font: 750 15px/1.15 system-ui, -apple-system, sans-serif }
.scx-pc small { position: relative; font: 500 12px/1.25 system-ui; color: var(--scx-face-muted) }
.scx-pc:hover, .scx-pc:focus-visible { outline: none; translate: 0 -10px; box-shadow: 0 1px 0 #fff inset, 0 20px 34px rgba(16,20,28,.22), 0 0 0 2px color-mix(in srgb, var(--scx-accent) 70%, transparent) }
.scx-deck { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px }
.scx-deck .scx-pc { min-height: 150px; padding-top: 46px }
.scx-pip { position: absolute; right: 12px; top: 12px; font: 46px/1 system-ui; color: var(--scx-accent); opacity: .1; pointer-events: none }
.scx-hand .scx-pip { font-size: calc(var(--w) * .42); right: calc(var(--w) * .1); top: calc(var(--w) * .14) }
@media (max-width: 420px) { .scx-deck { grid-template-columns: repeat(2, 1fr) } }
.scx-hand-scrim { position: fixed; z-index: 70; inset: 0; background: color-mix(in srgb, #06080c 42%, transparent); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); animation: scx-fade .25s ease both }
.scx-hand-scrim.out { animation: scx-fade .3s ease .1s reverse both }
.scx-hand { --w: 96px; position: absolute; left: 50%; bottom: 140px; width: 0; height: calc(var(--w) * 1.42) }
.scx-hand .scx-pc { position: absolute; left: calc(var(--w) / -2); bottom: 0; width: var(--w); height: calc(var(--w) * 1.42); padding: 10px 9px 26px; transform-origin: 50% 120% }
.scx-hand .scx-pc b { font-size: calc(var(--w) * .135) } .scx-hand .scx-pc small { font-size: calc(var(--w) * .1) }
.scx-hand .scx-pc .scx-rk { font-size: calc(var(--w) * .16) }
body.scx-on:has(.scx-hand-scrim) #composer { z-index: 75; position: relative }
body.scx-on:has(.scx-hand-scrim) #su-menu { opacity: .35; pointer-events: none; transition: opacity .25s }

/* Dictation: your words in gold leaf over bars that follow your voice. */
.scx-dict { position: fixed; z-index: 85; left: 50%; bottom: 24px; translate: -50% 0; box-sizing: border-box; width: min(560px, calc(100% - 24px)); display: grid; justify-items: center; gap: 10px; padding: 22px 22px 18px; border-radius: 26px; background: radial-gradient(120% 90% at 50% 0%, #26272d, #0b0b0d 70%); color: #f5f3ee; border: 1px solid #e8b84566; box-shadow: 0 30px 70px -20px #000d, inset 0 1px 0 #fff2; text-align: center; animation: scx-deal .42s var(--scx-spring) both }
.scx-dict.out { animation: scx-deal .24s ease-in reverse both }
.scx-dict .scx-eyebrow { color: #e8c76e }
.scx-words { margin: 0; min-height: 1.4em; max-height: 30vh; overflow: auto; font: 650 clamp(20px, 5vw, 26px)/1.3 system-ui, -apple-system, sans-serif; background: linear-gradient(100deg, #f7e3a1, #e8b845 30%, #fff1c2 48%, #c99a36 70%, #f0cf73); -webkit-background-clip: text; background-clip: text; color: transparent }
.scx-bars { display: flex; align-items: center; gap: 4px; height: 44px }
.scx-bars i { width: 4px; height: 36px; border-radius: 2px; background: linear-gradient(#f7e3a1, #a97a22); scale: 1 .3; transition: scale .08s linear }
.scx-bars:not(.live) i { animation: scx-bar 1.1s ease-in-out infinite } .scx-bars:not(.live) i:nth-child(3n) { animation-delay: -.3s } .scx-bars:not(.live) i:nth-child(3n+1) { animation-delay: -.65s } .scx-bars:not(.live) i:nth-child(4n) { animation-duration: .9s }
@keyframes scx-bar { 50% { scale: 1 .9 } }
.scx-dict .scx-fine { color: #b9b4a8; margin: 0 }
.scx-dict .scx-btn { background: #ffffff10; color: #f5f3ee; border-color: #ffffff26 }

/* Camera. */
.scx-cam { position: relative; overflow: hidden; border-radius: 22px; aspect-ratio: 4 / 3; background: #000 }
.scx-cam-v { display: block; width: 100%; height: 100%; object-fit: cover }
.scx-cam-rim { position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 2px #e8b845aa, inset 0 0 0 7px #0006, inset 0 0 0 8px #e8b84555; pointer-events: none }
.scx-shutter { position: relative; width: 64px; height: 64px; margin-left: auto; border: 0; border-radius: 50%; background: none; cursor: pointer; transition: transform .2s var(--scx-spring) }
.scx-shutter:active { transform: scale(.9) rotate(30deg) }

/* The conversation: a photo and a quoted passage in your message; the action row and follow-ups under Ace's. */
#chat .msg .scx-ref { display: block; width: min(220px, 60vw); max-height: 220px; object-fit: cover; margin: 0 0 8px auto; border-radius: 14px; box-shadow: 0 8px 18px -10px #0008 }
#chat .msg .scx-ref.none { display: inline-flex; align-items: center; gap: 6px; width: auto; padding: 6px 10px; font: 600 12px/1 system-ui; color: var(--scx-muted); background: color-mix(in srgb, var(--scx-ink) 6%, transparent) }
#chat .msg .scx-quoted { margin: 0 0 8px; padding: 6px 10px; border-left: 3px solid var(--scx-accent); border-radius: 4px 10px 10px 4px; background: color-mix(in srgb, var(--scx-accent) 8%, transparent); font: 13px/1.4 system-ui; color: var(--scx-muted); white-space: normal }
html body.aw-native-school.scx-on #p-chat #chat .msg.ace.scx-live::before {
  background: linear-gradient(100deg, var(--scx-accent) 30%, #f0cf73 48%, var(--scx-accent) 66%) !important; background-size: 220% 100% !important;
  -webkit-background-clip: text !important; background-clip: text !important; color: transparent !important; animation: scx-shimmer 1.6s linear infinite
}
@keyframes scx-shimmer { from { background-position: 120% 0 } to { background-position: -100% 0 } }
.scx-stop { margin: -4px 0 8px; justify-self: start }
.scx-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; margin: 12px 0 0 -8px; animation: scx-up .34s var(--scx-spring) both }
.scx-acts > button { display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: none; color: var(--scx-muted); cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background .18s, color .18s, transform .2s var(--scx-spring) }
.scx-acts > button:hover, .scx-acts > button:focus-visible { outline: none; color: var(--scx-accent); background: color-mix(in srgb, var(--scx-accent) 10%, transparent) }
.scx-acts > button:active { transform: scale(.88) }
.scx-acts > button.ok, .scx-acts > button[aria-pressed="true"] { color: #a97a22; background: color-mix(in srgb, #e8b845 18%, transparent) }
.scx-acts > button:disabled { opacity: .55 }
.scx-sig { margin-left: auto; padding-right: 2px; font: 800 9.5px/1 system-ui, -apple-system, sans-serif; letter-spacing: .18em; text-transform: uppercase; color: color-mix(in srgb, var(--scx-muted) 75%, transparent) }
.scx-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px }
.scx-chipb { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border: 1px solid color-mix(in srgb, var(--scx-accent) 32%, transparent); border-radius: 18px; background: color-mix(in srgb, var(--scx-accent) 6%, transparent); color: var(--scx-ink); font: 650 13.5px/1 system-ui, -apple-system, sans-serif; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: transform .22s var(--scx-spring), border-color .2s, background .2s }
.scx-chipb:hover, .scx-chipb:focus-visible { outline: none; border-color: color-mix(in srgb, var(--scx-accent) 65%, transparent); background: color-mix(in srgb, var(--scx-accent) 12%, transparent) }
.scx-chipb:active { transform: scale(.95) }
.scx-chipb.gold { border-color: transparent; background: var(--scx-gold); color: #241806; box-shadow: 0 6px 14px -8px #a97a22, inset 0 1px 0 #fff8 }
.scx-joker { margin: 8px 0 }
.scx-joker .scx-row { margin-top: 8px }

/* The workbench. */
.scx-steps { margin-top: 6px }
.scx-step { display: flex; align-items: flex-start; gap: 12px; padding: 10px 12px; margin-top: 6px; border: 1px solid var(--scx-line); border-radius: 14px; background: var(--scx-face); color: var(--scx-face-ink); cursor: pointer; font: 14.5px/1.4 system-ui }
.scx-step input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: #c99a36; flex: none }
.scx-step:has(input:checked) span { text-decoration: line-through; color: var(--scx-face-muted) }
.scx-steps.focus { animation: scx-up .5s var(--scx-spring) both }
.scx-sents { display: grid; gap: 6px; margin-top: 10px }
.scx-sent { padding: 10px 12px; text-align: left; border: 1px solid var(--scx-line); border-radius: 12px; background: none; color: var(--scx-ink); font: 14px/1.45 system-ui; cursor: pointer; transition: border-color .2s, background .2s }
.scx-sent:hover, .scx-sent:focus-visible { outline: none; border-color: color-mix(in srgb, var(--scx-accent) 55%, transparent); background: color-mix(in srgb, var(--scx-accent) 6%, transparent) }
.scx-ask { margin-top: 12px; padding: 14px; border-radius: 16px; background: color-mix(in srgb, #e8b845 10%, transparent); border: 1px solid color-mix(in srgb, #e8b845 40%, transparent); animation: scx-up .36s var(--scx-spring) both }
.scx-ask blockquote { margin: 0; padding-left: 10px; border-left: 3px solid #c99a36; font: 14px/1.45 system-ui; color: var(--scx-ink) }

/* Toast. */
.scx-toast { position: fixed; z-index: 90; left: 50%; bottom: 150px; translate: -50% 0; display: flex; align-items: center; gap: 12px; max-width: min(520px, calc(100% - 32px)); padding: 12px 16px; border-radius: 16px; background: #141518; color: #f5f3ee; border: 1px solid #e8b84555; box-shadow: 0 18px 40px -16px #000c; font: 600 14px/1.35 system-ui, -apple-system, sans-serif; animation: scx-up .36s var(--scx-spring) both; transition: opacity .4s, translate .4s }
.scx-toast.out { opacity: 0; translate: -50% 8px }
.scx-toast .scx-btn { min-height: 32px; flex: none; background: #ffffff12; color: #f5f3ee; border-color: #ffffff2a }

@media (prefers-reduced-motion: reduce) {
  .scx-scrim, .scx-sheet, .scx-dict, .scx-toast, .scx-acts, .scx-quote, .scx-photo, .scx-latest, .scx-ask, .scx-hand-scrim, .scx-bars i { animation: none !important }
  html body.aw-native-school.scx-on #p-chat #chat .msg.ace.scx-live::before { animation: none !important }
}

/* The Ace keyboard (web-keyboard.mjs) covers the bottom of the screen and says how tall it is in --ace-kb-h; the box rides
   just above it, as on Ace Mobile, so you always see what you type. */
html.ace-kb-up body.aw-native-school.scx-on[data-school-category="chat"] #composer { margin-bottom: calc(var(--ace-kb-h, 0px) + 6px) !important }
html.ace-kb-up body.aw-native-school.scx-on .scx-study-tab { display: none }

/* Live Litigation: the six hearing stages sit in the courtroom's header row, which wraps only at 430px and narrower.
   Wider than that, the row squeezed the stages into a 53px column and the case title into 17px, a clipped "T H…" at the
   left edge (Ace Law, 2026-11-03). The header now keeps the title and End on one line, the two pills on the next and
   the stages on their own line; from 900px the pills join the title's line again. */
html body.aw-native-school #session .s-top:has(> .sl-stages) { flex-wrap: wrap; row-gap: 10px }
html body.aw-native-school #session .s-top:has(> .sl-stages) > .what { flex: 1 1 0; min-width: 0 }
html body.aw-native-school #session .s-top:has(> .sl-stages) > .tally { order: 3; flex-basis: 100%; margin-left: 0 }
html body.aw-native-school #session .s-top > .sl-stages { order: 4; flex: 1 0 100%; margin: 0 }
@media (min-width: 900px) {
  html body.aw-native-school #session .s-top:has(> .sl-stages) > .tally { order: 0; flex-basis: auto; margin-left: auto }
}

/* Make flashcards: the deck's progress comes into view above the tab bar, not under it. */
html body.aw-native-school #guideOut > .riffle { scroll-margin: 16px 0 132px }

/* Grill me stays above the tab bar. On a long class list the button sat below the Grill screen's fold: its top edge
   peeked out just above the tab bar and a tap there landed on the tab bar (Vet, Business, Pre-Health, Residency,
   Nursing, Accounting and Engineering at 500x789, 2026-11-04). It now rides at the foot of the screen on a band of the
   room's own colour while the classes scroll under it, and settles back into its place above the mic note at the end
   of the list. The band is the old margin turned into padding (the -8px keeps the mic note's 13px gap), so nothing moves
   when the list is short. A sticky box stops at the screen's bottom padding, which left a strip under the band where the
   classes showed through; this rule owns that padding (the same 36px on phones and 50px wider) as --grill-foot and pulls
   the band down by it, so it sits flush on the tab bar. */
html body.aw-native-school.aw-school-universe #app #p-grill { --grill-foot: 50px; padding-bottom: var(--grill-foot); scroll-padding-bottom: 112px }
@media (max-width: 850px) { html body.aw-native-school.aw-school-universe #app #p-grill { --grill-foot: 36px } }
html body.aw-native-school.aw-school-universe #p-grill > .go {
  position: sticky; bottom: calc(-1 * var(--grill-foot, 0px)); z-index: 3; margin: 0 0 -8px; padding: 18px 0 8px;
  background: linear-gradient(transparent, var(--room, #fff) 18px)
}
/* Med's Grill (Pick a set) already keeps Plan a session and Start at the foot of the screen, but its band only turned
   solid a quarter of the way down, so the label sat on the last set's text, and its fixed pale grey showed as a box
   on the white room (and a bright one in dark). It now takes the room's own colour from the label's top edge, and sits
   flush on the tab bar like Grill me (on short phones the sets showed in the strip under it); 8px under Start, the
   -4px keeps its place in the flow. */
html body.aw-native-school.aw-school-universe #p-grill > .planbar {
  bottom: calc(-1 * var(--grill-foot, 0px)); padding-bottom: 8px; margin-bottom: -4px;
  background: linear-gradient(transparent, var(--room, #fff) 10px)
}

/* Med's Grill (Pick a set) in the dark appearance. The page's own Med rule paints every set card white (#fff), while
   the dark room turns their titles near-white and their lines light grey (the room's ink and muted ink), so the sets
   could not be read: title 1.2:1, line 2:1 (2026-11-04). In dark the cards now stand on the room's raised surface with
   the room's line and ink, like the School's other dark surfaces. Light keeps the page's white cards (no rule matches). */
html[data-school-theme="dark"][data-track="med"] body.aw-native-school.aw-school-universe .gset {
  background: var(--room-raised); border-color: var(--room-line); color: var(--room-ink);
  box-shadow: 0 16px 30px -24px #000
}
