/* Floor plan studio */
.plan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.plan-card { display: flex; flex-direction: column; text-align: left; padding: 0; overflow: hidden; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); cursor: pointer; color: var(--ink); font: inherit; transition: border-color .15s, transform .05s; }
.plan-card.mine { cursor: default; }
.plan-card:hover { border-color: var(--faint); }
.plan-card svg { display: block; width: 100%; height: auto; border-bottom: 1px solid var(--line); }
.plan-card .pc-body { padding: 10px 12px 12px; display: grid; gap: 3px; }
.plan-card .pc-body a { color: var(--ink); text-decoration: none; }
.plan-card .pc-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }

body.studio #app { max-width: none; padding: 0; }
body.studio .foot, body.studio .announce { display: none; }
.pe { display: flex; flex-direction: column; height: calc(100vh - 65px); height: calc(100dvh - 65px); }
body.app .pe { height: 100vh; height: 100dvh; }
.pe-top { display: flex; gap: 8px; align-items: center; padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--panel); flex-wrap: wrap; }
.pe-name { flex: 0 1 240px; width: auto; min-width: 120px; font-weight: 600; font-size: 15px; }
.pe-top select { width: auto; }
.pe-spacer { flex: 1; }
.pe-zoom { display: flex; gap: 4px; align-items: center; }
.pe-fit { min-width: 58px; font: 500 12px var(--mono); font-variant-numeric: tabular-nums; }
/* save status: a dot and one word; the rest on wide screens and in the tooltip */
.pe-status { display: inline-flex; align-items: center; white-space: nowrap; min-width: 0; overflow: hidden; text-overflow: ellipsis; cursor: default; }
.pe-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--pass); flex: none; margin-right: 6px; }
.pe-status.busy i { background: var(--faint); animation: pulse 1.6s infinite; }
.pe-status.bad i { background: var(--rfi); }
.pe-status .more { display: none; }
@media (min-width: 1360px) { .pe-status .more { display: inline; } }
.pe-body { flex: 1; display: grid; grid-template-columns: 208px minmax(0, 1fr) 380px; min-height: 0; }
.pe-left { border-right: 1px solid var(--line); background: var(--panel); overflow-y: auto; display: flex; flex-direction: column; }
.pe-tools { padding: 10px 10px 12px; border-bottom: 1px solid var(--line); }
.pane-head { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--faint); margin: 0 2px 8px; }
.tl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.tl-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); }
.pe-canvas { position: relative; min-width: 0; min-height: 0; overflow: hidden; background: #fbfaf6; }
.pe-canvas svg { display: block; width: 100%; height: 100%; touch-action: none; user-select: none; -webkit-user-select: none; font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.pe-canvas .lbl { pointer-events: none; }
.pe-hint { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); background: rgba(34, 33, 29, .86); color: #fff; font-size: 12.5px;
  padding: 5px 11px; border-radius: 99px; pointer-events: none; white-space: nowrap; max-width: calc(100% - 20px); overflow: hidden; text-overflow: ellipsis; }
.pe-hint:empty { display: none; }
.pe-right { border-left: 1px solid var(--line); background: var(--panel); display: flex; flex-direction: column; min-height: 0; }
.pe-tabs { display: flex; gap: 18px; padding: 0 16px; border-bottom: 1px solid var(--line); flex: none; }
.pe-tabs button { background: none; border: 0; padding: 11px 0 10px; margin-bottom: -1px; border-bottom: 2px solid transparent; font-weight: 600; font-size: 13.5px; color: var(--muted); cursor: pointer; }
.pe-tabs button.on { color: var(--ink); border-bottom-color: var(--accent); }
.pe-side { flex: 1; overflow-y: auto; padding: 14px 16px 24px; min-height: 0; }
.pe-side[hidden], .pe-chat[hidden] { display: none; }
.pe-side h3 { margin: 0 0 10px; font-size: 15px; }
.pe-side h4 { margin: 18px 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.pe-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pe-stats div { background: var(--soft); border-radius: 10px; padding: 8px 10px; }
.pe-stats b { display: block; font-size: 18px; }
.pe-stats span { font-size: 12px; color: var(--muted); }
.pe-table { width: 100%; border-collapse: collapse; font-size: 13px; background: transparent; }
.pe-table td { padding: 5px 4px; border-bottom: 1px solid var(--line); }
.pe-table td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pe-table tr[data-select] { cursor: pointer; }
.pe-table tr[data-select]:hover td { background: var(--soft); }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 7px; vertical-align: -1px; border: 1px solid rgba(0, 0, 0, .15); }

@media (max-width: 1100px) { .pe-body { grid-template-columns: 176px minmax(0, 1fr) 330px; } }
@media (max-width: 900px) {
  .pe { height: auto; }
  /* the body sizes to its content here; with flex: 1 the tool strip was squeezed to nothing */
  .pe-body { flex: none; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 62vh auto; }
  .pe-left { border-right: 0; border-bottom: 1px solid var(--line); flex-direction: row; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
  .pe-left::-webkit-scrollbar { display: none; }
  .pe-tools { display: flex; align-items: center; padding: 6px 8px; border-bottom: 0; }
  .pe-tools .pane-head, .pe-tool kbd, .pe-layers { display: none; }
  .tl-grid { display: flex; gap: 2px; }
  .tl-row { display: flex; gap: 2px; margin: 0 0 0 6px; padding: 0 0 0 6px; border-top: 0; border-left: 1px dashed var(--line-2); }
  .pe-tool, .pe-tool.sm { flex: none; width: 58px; height: 50px; }
  .pe-right { border-left: 0; border-top: 1px solid var(--line); min-height: 70vh; }
  .pe-zoom .btn:not(.pe-fit) { display: none; }
  .pe-name { flex-basis: 150px; } /* items wrap by their basis: a narrower name keeps the bar on one row */
}

/* editor tools and panels */
.pe-tool { height: 54px; border-radius: 6px; border: 1px solid transparent; background: transparent; color: var(--muted); cursor: pointer;
  display: grid; place-items: center; align-content: center; gap: 2px; position: relative; padding: 4px 2px; font-size: 11.5px; font-weight: 500; }
.pe-tool span { color: inherit; }
.pe-tool kbd { position: absolute; right: 4px; top: 3px; font-family: var(--mono); font-size: 9px; color: var(--faint); }
.pe-tool.sm { height: 46px; font-size: 11px; }
.pe-tool:hover:not(:disabled) { background: var(--soft); color: var(--ink); }
.pe-tool.on { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-line); }
.pe-tool:disabled { opacity: .35; cursor: default; }
.pe-sep { width: 28px; height: 1px; background: var(--line); margin: 6px 0; }
.pe-head { display: flex; justify-content: space-between; align-items: baseline; }
.pe-field { display: grid; gap: 3px; font-size: 12.5px; color: var(--muted); font-weight: 600; margin: 0 0 10px; }
.pe-field input, .pe-field select { font-weight: 500; }
.pe-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pe-area { font-size: 13.5px; margin: 2px 0 12px; }
.pe-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.btn.danger { color: var(--ncr); }
.btn.danger:hover { border-color: var(--ncr); }
.pe-issues { margin-top: 12px; background: var(--ncr-bg); color: var(--ncr); border-radius: 10px; padding: 9px 12px; font-size: 13px; }
.pe-issues ul { margin: 4px 0 0; padding-left: 18px; }
#pc.tool-select { cursor: grab; }
#pc.panning { cursor: grabbing; }
#pc.tool-select [data-kind] { cursor: move; }
#pc.tool-room { cursor: crosshair; }
#pc .h-n, #pc .h-s { cursor: ns-resize; }
#pc .h-e, #pc .h-w { cursor: ew-resize; }
#pc .h-nw, #pc .h-se { cursor: nwse-resize; }
#pc .h-ne, #pc .h-sw { cursor: nesw-resize; }
@media (min-width: 901px) { body.studio { overflow: hidden; } }
.pe-palette { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.pe-palette button { display: flex; align-items: center; gap: 6px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 8px; background: #fbfaf6;
  color: #22211d; cursor: pointer; font-size: 12px; text-align: left; }
.pe-palette button:hover { border-color: var(--faint); }
.pe-palette button.on { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 30%, transparent); }
.pe-palette svg { flex: none; }
#pc.tool-furniture { cursor: copy; }
.pe-menu { position: relative; }
.pe-menu summary { list-style: none; }
.pe-menu summary::-webkit-details-marker { display: none; }
.pe-menu-list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .14); padding: 6px; display: grid; min-width: 250px; }
.pe-menu-list button { text-align: left; background: none; border: 0; padding: 8px 10px; border-radius: 7px; cursor: pointer; font-size: 13.5px; color: var(--ink); }
.pe-menu-list button:hover { background: var(--soft); }

/* design assistant */
.pe-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; margin-bottom: 10px; }
.pe-seg button { border: 0; background: var(--panel); padding: 7px 6px; font-size: 12.5px; font-weight: 600; color: var(--muted); cursor: pointer; }
.pe-seg button.on { background: var(--accent-soft); color: var(--accent); }
#assist-text { font-family: inherit; font-size: 13.5px; min-height: 92px; }
.pe-chips { display: flex; flex-wrap: wrap; gap: 5px; margin: 8px 0 12px; }
.pe-chips button { border: 1px solid var(--line); background: var(--panel); border-radius: 99px; padding: 3px 9px; font-size: 11.5px; color: var(--muted); cursor: pointer; }
.pe-chips button:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.assist-feed { margin-top: 14px; display: grid; gap: 6px; font-size: 12.5px; }
.assist-feed .msg { background: var(--soft); border-radius: 4px 10px 10px 10px; padding: 8px 10px; font-size: 13px; }
.assist-feed .turn { font-size: 11px; font-weight: 700; color: var(--faint); text-transform: uppercase; letter-spacing: .04em; margin-top: 4px; }
.assist-feed .ev { display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 6px; color: var(--muted); }
.assist-feed .ev.ok span:first-child { color: var(--pass); font-weight: 700; }
.assist-feed .ev.no { color: var(--rfi); }
.assist-done { margin-top: 14px; border: 2px solid var(--accent); border-radius: 12px; padding: 10px 12px; display: grid; gap: 4px; font-size: 13px; }
.assist-done.warn { border-color: var(--rfi); }
.assist-done p { margin: 4px 0 0; }
.assist-done ul { margin: 2px 0 0; padding-left: 18px; font-size: 12.5px; }
.assist-done ul.bad { color: var(--ncr); }
.assist-err { color: var(--ncr); font-size: 13px; }

/* simulation */
.pe-mode { margin: 0; grid-template-columns: repeat(4, auto); }
.pe-mode button { padding: 6px 13px; }
.sim-scores { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.sim-score { border-radius: 10px; padding: 7px 6px; text-align: center; background: var(--soft); border-top: 3px solid var(--line); }
.sim-score b { display: block; font-size: 21px; line-height: 1.1; }
.sim-score span { font-size: 11px; color: var(--muted); }
.sim-score.good { border-top-color: var(--pass); } .sim-score.good b { color: var(--pass); }
.sim-score.fair { border-top-color: var(--rfi); } .sim-score.fair b { color: var(--rfi); }
.sim-score.poor { border-top-color: var(--ncr); } .sim-score.poor b { color: var(--ncr); }
.sim-time { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.sim-time input[type=range] { padding: 0; border: 0; accent-color: #e8a900; }
.sim-notes { margin: 6px 0 0; padding-left: 18px; font-size: 12.5px; color: var(--rfi); }
.sim-notes li { margin: 3px 0; }
.pe-table .bad { color: var(--ncr); font-weight: 600; }
@media (max-width: 900px) { .pe-mode button { padding: 6px 9px; } }
.sim-compare td.up { color: var(--pass); font-weight: 700; }
.sim-compare td.down { color: var(--ncr); font-weight: 700; }
#sim-goal { font-family: inherit; font-size: 13.5px; min-height: 56px; }

/* studio: layers */
.pe-layers { padding: 10px 8px 16px; }
.ly { display: grid; grid-template-columns: 24px 24px minmax(0, 1fr); align-items: center; gap: 2px; }
.ly.off .ly-name { color: var(--faint); }
.ly-i { width: 24px; height: 24px; border: 0; background: none; color: var(--muted); border-radius: 4px; cursor: pointer; display: grid; place-items: center; padding: 0; }
.ly-i svg { width: 15px; height: 15px; }
.ly-i:hover { background: var(--soft); color: var(--ink); }
.ly-i.on { color: var(--accent); }
.ly-name { text-align: left; border: 0; background: none; font-size: 13px; padding: 5px 4px; border-radius: 4px; color: var(--ink); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ly-name:disabled { cursor: default; color: inherit; }
.ly-name:hover:not(:disabled) { background: var(--soft); }
.ly-name span { font-family: var(--mono); font-size: 10.5px; color: var(--faint); }
.ly-items { display: grid; margin: 0 0 6px 50px; border-left: 1px dashed var(--line-2); padding-left: 6px; }
.ly-items button { text-align: left; border: 0; background: none; font-size: 12.5px; padding: 3px 6px; color: var(--muted); border-radius: 4px; cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ly-items button:hover { background: var(--soft); color: var(--ink); }
.ly-items button.on { background: var(--accent-soft); color: var(--accent); }
.nav-studio span { font-family: var(--mono); font-size: 9.5px; background: var(--accent); color: #fff; border-radius: 3px; padding: 1px 4px; margin-left: 3px; vertical-align: 2px; }
#pc.tool-measure, #pc.tool-note { cursor: crosshair; }
#pc .note { cursor: move; }
.pe-menu.left .pe-menu-list { left: 0; right: auto; }
.pe-menu-list a { padding: 8px 10px; border-radius: 7px; font-size: 13.5px; color: var(--ink); }
.pe-menu-list a:hover { background: var(--soft); text-decoration: none; }

/* studio: the AI designer chat */
.pe-chat { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.chat-log { flex: 1; overflow-y: auto; padding: 14px 14px 8px; display: grid; gap: 12px; align-content: start; }
.msg-u { display: flex; justify-content: flex-end; }
.msg-u .bubble { background: var(--ink); color: var(--bg); border-radius: 12px 12px 3px 12px; padding: 8px 12px; font-size: 13.5px; max-width: 86%; }
.msg-u .bubble img { display: block; max-width: 100%; border-radius: 6px; margin-bottom: 6px; cursor: zoom-in; }
.msg-u .file { font-family: var(--mono); font-size: 11px; opacity: .8; margin-bottom: 3px; }
.msg-a { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 9px; align-items: start; }
.msg-a .av { width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--accent); color: var(--accent); display: grid; place-items: center; font-family: var(--display); font-weight: 600; font-size: 12px; }
.msg-a .body { background: var(--bg); border: 1px solid var(--line); border-radius: 3px 12px 12px 12px; padding: 9px 12px; font-size: 13.5px; min-width: 0; }
.msg-a .body p { margin: 0 0 6px; }
.msg-a .body p:last-child { margin-bottom: 0; }
.msg-a.error .body { border-color: color-mix(in srgb, var(--ncr) 40%, var(--line)); }
.msg-a .working { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 12.5px; margin-bottom: 4px; }
.msg-a details { margin-top: 6px; font-size: 12.5px; }
.msg-a details summary { cursor: pointer; color: var(--muted); font-family: var(--mono); font-size: 11px; }
.msg-a .assist-feed { margin-top: 8px; }
.msg-a .stats { font-family: var(--mono); font-size: 11px; color: var(--muted); margin: 6px 0 2px; }
.msg-a ul.bad { color: var(--ncr); font-size: 12.5px; margin: 4px 0; padding-left: 18px; }
.msg-a .reading { background: var(--accent-soft); border-radius: 6px; padding: 7px 9px; font-size: 12.5px; margin-bottom: 8px; }
.msg-a .reading b { display: block; color: var(--accent); }
.msg-a.hello .body { background: var(--panel); }
.msg-a.hello .pe-chips { margin: 10px 0 6px; }
.chat-more { display: flex; gap: 5px; flex-wrap: wrap; padding-left: 37px; }
.chat-more button { border: 1px solid var(--line); background: var(--panel); border-radius: 99px; padding: 3px 9px; font-size: 11.5px; color: var(--muted); cursor: pointer; }
.chat-more button:hover { border-color: var(--accent); color: var(--accent); }
.chat-in { border-top: 1px solid var(--line); padding: 10px 12px 12px; flex: none; }
.chat-in textarea { font-family: var(--sans); font-size: 14px; min-height: 64px; max-height: 180px; resize: vertical; border-radius: 8px; }
.chat-bar { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.chat-bar .tiny { flex: 1; text-align: center; }
.chat-att:not(:empty) { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12.5px; background: var(--accent-soft); border-radius: 6px;
  padding: 4px 4px 4px 10px; margin-bottom: 8px; }

/* studio: 3D and walk */
.view3d { position: absolute; inset: 0; background: #eef0f2; }
.view3d canvas { display: block; }
.v3-msg { position: absolute; left: 50%; top: 45%; transform: translate(-50%, -50%); color: var(--muted); font-size: 14px; display: flex; gap: 8px; align-items: center; text-align: center; max-width: 80%; }
.hud3d { position: absolute; inset: 0; pointer-events: none; }
.hud3d > * { pointer-events: auto; }
.hud-card { position: absolute; left: 12px; top: 12px; width: 320px; max-width: calc(100% - 24px); background: color-mix(in srgb, var(--panel) 94%, transparent);
  border: 1px solid var(--line-2); border-radius: 6px; padding: 10px 12px; box-shadow: 0 6px 20px rgba(0, 0, 0, .08); }
.hud-card p { margin: 6px 0 8px; color: var(--muted); }
.hud-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.hud-row input[type=range] { flex: 1; min-width: 90px; padding: 0; border: 0; accent-color: #e8a900; }
.hud-row select { width: auto; padding: 4px 6px; font-size: 12.5px; }
.hud-pad { position: absolute; right: 16px; bottom: 16px; display: grid; grid-template-columns: repeat(3, 46px); grid-template-rows: repeat(2, 46px); gap: 6px; }
.hud-pad button { border: 1px solid var(--line-2); background: color-mix(in srgb, var(--panel) 90%, transparent); border-radius: 8px; font-size: 16px; cursor: pointer; touch-action: none; user-select: none; }
.hud-pad button[data-hold=fwd] { grid-column: 2; grid-row: 1; }
.hud-pad button[data-hold=left] { grid-column: 1; grid-row: 2; }
.hud-pad button[data-hold=back] { grid-column: 2; grid-row: 2; }
.hud-pad button[data-hold=right] { grid-column: 3; grid-row: 2; }
.hud-map { position: absolute; right: 16px; top: 12px; width: 180px; border: 1px solid var(--line-2); border-radius: 4px; overflow: hidden; background: #fcfcfb; }
.hud-map svg { display: block; width: 100%; height: auto; }

/* 3D and walk: keys instead of instructions; the chat greeting's models */
.hud-card .keys { display: flex; gap: 10px; flex-wrap: wrap; margin: 8px 0 10px; font-size: 12px; color: var(--muted); }
.hud-card .keys span { display: inline-flex; gap: 3px; align-items: center; }
.hud-card kbd { font: 500 11px var(--mono); color: var(--ink); background: var(--bg); border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 4px; padding: 1px 5px; margin-right: 2px; }
.hello-models { display: flex; gap: 6px; margin-top: 10px; }
.block.first { border-top: 0; padding-top: 16px; }

/* studio.html: its own app bar and designs page, no site header or footer */
body.app { background: var(--bg); }
.app-bar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px; height: 56px; padding: 0 20px; background: var(--panel); border-bottom: 1px solid var(--line); }
.app-brand { display: flex; align-items: center; gap: 9px; font: 600 17px var(--display); letter-spacing: -.03em; color: var(--ink); text-decoration: none; }
.app-brand:hover { text-decoration: none; }
.app-brand .mark { display: block; width: 26px; height: 26px; flex: none; }
.app-mark { display: block; flex: none; width: 28px; height: 28px; margin-right: 2px; border-radius: 7px; transition: transform .2s ease; }
.app-mark img { display: block; width: 100%; height: 100%; }
.app-mark:hover { transform: scale(1.06); text-decoration: none; }
.app-tag { font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: .07em; color: #fff; background: var(--accent); border-radius: 4px; padding: 2px 7px; }
.acct-slot { display: inline-flex; align-items: center; }
.acct-slot .btn { white-space: nowrap; }
.app-home { max-width: 1180px; margin: 0 auto; padding: 36px 28px 80px; }
.app-head { display: flex; gap: 16px 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 8px; }
.app-head h1 { font-size: 40px; margin: 0; }
.app-note { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; background: var(--panel); border: 1px dashed var(--line-2); border-radius: 8px; padding: 10px 12px 10px 16px; font-size: 14px; color: var(--muted); }
.app-h2 { display: flex; gap: 10px; align-items: baseline; font-size: 19px; margin: 34px 0 14px; }
.app-h2 span { font: 500 12px var(--mono); color: var(--faint); }
.app-h2 small { font-size: 13px; font-weight: 400; color: var(--muted); font-family: var(--sans); letter-spacing: 0; }
.pe-status.bad { color: var(--rfi); }
/* designs page: describe a building and the AI designer starts on it */
.app-hi { margin: 0 0 2px; color: var(--muted); font-size: 15px; }
.app-ask { margin: 20px 0 6px; max-width: 820px; }
.app-ask-box { background: var(--panel); border: 1.5px solid var(--line-2); border-radius: 12px; padding: 10px 12px 10px 16px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 10px 28px rgba(0, 0, 0, .05); transition: border-color .15s, box-shadow .15s; }
.app-ask-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent); }
.app-ask textarea { border: 0; padding: 4px 0; min-height: 54px; font-family: var(--sans); font-size: 16px; line-height: 1.5; resize: none; background: transparent; }
.app-ask textarea:focus { outline: none; }
.app-ask textarea:disabled { cursor: not-allowed; }
.app-ask textarea.nudge { animation: nudge .3s; }
@keyframes nudge { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.app-ask-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.app-ask-bar label.btn.is-off { opacity: .45; cursor: not-allowed; }
.app-ask-file:not(:empty) { display: inline-flex; align-items: center; gap: 2px; min-width: 0; max-width: 100%; font-size: 13px; background: var(--accent-soft); border-radius: 6px; padding: 1px 2px 1px 9px; }
.app-ask-file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-ask-ex { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.app-ask-ex span { font-size: 12.5px; color: var(--faint); margin-right: 2px; }
.app-ask-ex button { border: 1px solid var(--line-2); background: var(--panel); border-radius: 99px; padding: 4px 11px; font-size: 13px; color: var(--muted); cursor: pointer; }
.app-ask-ex button:hover { border-color: var(--accent); color: var(--accent); }

@media (max-width: 600px) {
  .pe-top { padding: 6px 10px; gap: 6px; }
  .pe-top .app-mark, .pe-top #pe-file, .pe-top .pe-name { order: -2; } .pe-top .acct-slot { order: -1; } .pe-top .pe-name { flex: 1 1 120px; min-width: 0; }
  .pe-top .pe-mode { flex: 1 1 auto; grid-template-columns: repeat(4, minmax(0, 1fr)); } /* its own width: it wraps to the second row, then grows */
  .pe-top .pe-spacer, .pe-top .pe-zoom, .pe-status:not(.bad) { display: none; }
  .pe-status.bad { order: 1; flex-basis: 100%; white-space: normal; }
  .app-bar { padding: 0 14px; } .app-home { padding: 24px 16px 60px; } .app-head h1 { font-size: 30px; } .app-brand span:last-child { display: none; }
  .plan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .plan-card .pc-body { padding: 8px 10px 10px; } .plan-card .pc-body b { font-size: 14px; line-height: 1.3; }
  .pc-actions .pc-openbtn { display: none; }
  .app-ask-ex button { font-size: 12.5px; padding: 4px 10px; }
  /* the describe-it box comes straight after the heading; the guest note moves to the end */
  .app-home { display: flex; flex-direction: column; } .app-head { display: contents; } .app-note { order: 1; margin-top: 28px; }
}
