/* Stone Constellations: header, editor tabs, Stones / Characters and their links. */
.sc-trash-count{position:absolute;right:0;top:0;min-width:16px;height:16px;padding:0 3px;border-radius:9px;background:#a9322d;color:#fff;font:12px/16px Arial,sans-serif;text-align:center;letter-spacing:0}
.sc-bell-dot{position:absolute;right:1px;top:1px;width:9px;height:9px;border-radius:50%;background:#a9322d;box-shadow:0 0 0 2px #fafaf7}
#scReopen{height:26px;padding:0 10px;margin-left:6px;font:600 12px/24px Arial,Helvetica,sans-serif;letter-spacing:0;border:1px solid #a9322d;border-radius:6px;background:#a9322d;color:#fff;white-space:nowrap;cursor:pointer;box-shadow:0 2px 6px rgba(169,50,45,.25)}
#scReopen:hover{background:#872521}
#scReopen.sent{background:#faf3f1;color:#872521;border-color:#e5c9c1;box-shadow:none;font-weight:400}
[hidden]{display:none!important}
html[data-theme="dark"] .sc-bell-dot{box-shadow:0 0 0 2px #202729}
/* Google Drive box in the cog panel */
#scAppearanceDialog .sc-drive-settings .atelier-drive-state{margin:10px 0 4px}
#scAppearanceDialog .sc-drive-settings .atelier-drive-folder{margin:0 0 12px}
.sc-drive-settings button{border:1px solid #deded9;border-radius:7px;background:#fff;color:#242423;padding:9px 14px;font:13px Arial,Helvetica,sans-serif;cursor:pointer}
.sc-drive-settings button:hover{background:#eeeee9}
html[data-theme="dark"] .sc-drive-settings button{background:#283032;color:var(--ink);border-color:var(--line)}
/* Constellation text box: a fixed box down to just above "Link a Timeline Event", scrolling when long; no drag handle. */
#eventPanel #eventStory{height:185px;min-height:0;resize:none;overflow:auto}
#eventPanel #eventError:empty{margin:0;min-height:0}
#soylLinks{border-top:0!important;margin-top:30px!important;padding-top:0!important}
#soylLinks .linked-toolbar{border-top:0}
#soylLinks .story-event-link{border-bottom:0}
#soylLinks .story-event-link:hover{background:transparent}
/* The lock on each row of My Constellations (sc-cloud.js): same look as the Timeline's lock. */
.event-panel .series-actions .sc-lock{display:grid;place-items:center;width:34px;height:34px;padding:0!important;margin-right:auto;border:1px solid #deded9;border-radius:8px;background:#fffefb;color:#242423}
.event-panel .series-actions .sc-lock.on{border-color:#242423;background:#242423;color:#fff}
html[data-theme="dark"] .event-panel .series-actions .sc-lock:not(.on){background:#283032!important;border-color:#3d4648!important;color:#efe9e2!important}
html[data-theme="dark"] .event-panel .series-actions .sc-lock.on{background:#efe9e2!important;border-color:#efe9e2!important;color:#242423!important}
/* Stones / Characters (sc-parts.js): one joined switch above the heap and on the surface; the chosen half in the aqua tint used for toggles. */
.pile-family{display:inline-flex;margin-left:8px;vertical-align:top;border:1px solid var(--line);border-radius:7px;overflow:hidden}
.zoombar .pile-family.board-family{margin:0 4px 0 0}
.pile-family .btn.small{margin:0;border:0;border-radius:0;font-size:12px;background:transparent}
.pile-family .btn+.btn{border-left:1px solid var(--line)}
.pile-family .btn[aria-pressed=true]{background:#dff3ec;color:#1f3d35}
html[data-theme="dark"] .pile-family .btn{background:transparent!important;color:var(--ink)!important}
html[data-theme="dark"] .pile-family .btn[aria-pressed=true]{background:#2f4a43!important;color:#f2eee7!important}
/* The link in My Selection: a chain until linked, then the other drawing; the choices open under the object, never over it. */
.poolitem .sc-link{flex:0 0 38px;width:38px;height:38px;padding:2px;display:grid;place-items:center;border:1px dashed var(--line);border-radius:8px;background:transparent;color:var(--ink2);cursor:pointer}
.poolitem .sc-link.linked{border-style:solid;border-color:#91d9c1;background:#eef8f4}
.poolitem .sc-link:hover,.poolitem .sc-link[aria-expanded=true]{border-color:#2f7d6b;color:#2f7d6b}
.poolitem .sc-link .stone-svg{width:32px;height:32px}
.sc-link-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(84px,1fr));gap:6px;padding:8px;margin:-2px 0 6px;border:1px solid #91d9c1;border-radius:9px;background:#f6fbf9}
.sc-link-head{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:12px;font-weight:600;color:var(--ink)}
.sc-link-head .btn.small{font-size:12px}
.sc-link-choice{display:flex;flex-direction:column;align-items:center;gap:2px;padding:4px 2px;border:1px solid transparent;border-radius:8px;background:#fff;cursor:pointer;font:12px/1.15 inherit;color:var(--ink);text-align:center}
.sc-link-choice .stone-svg{width:64px!important;height:64px!important;flex:0 0 64px}
.sc-link-choice:hover{border-color:#91d9c1}
.sc-link-choice[aria-pressed=true]{border-color:#2f7d6b;background:#dff3ec}
.sc-swap{position:absolute;display:grid;place-items:center;border:1.4px solid #2f7d6b;border-radius:5px;background:#dff3ec;color:#1f3d35;cursor:pointer;box-sizing:border-box}
.sc-swap svg{width:100%;height:100%}
.sc-swap[hidden]{display:none}
.board.previewing .sc-swap{visibility:hidden}
html[data-theme="dark"] .sc-swap{background:#2f4a43;border-color:#5fae96;color:#f2eee7}
.poollist.sc-fade{-webkit-mask-image:linear-gradient(to bottom,#000 calc(100% - 22px),transparent);mask-image:linear-gradient(to bottom,#000 calc(100% - 22px),transparent)}
/* The name sits on the note box's left edge, so the object reads as one row. */
#pool1 .poolitem .nm .final-stone-name{padding:4px 0 6px}
html[data-theme="dark"] .poolitem .sc-link{color:#cfc8bf;border-color:#4a5355}
html[data-theme="dark"] .poolitem .sc-link.linked{background:#2f4a43;border-color:#5fae96}
html[data-theme="dark"] .sc-link-grid{background:#222829;border-color:#3d6b5e}
html[data-theme="dark"] .sc-link-choice{background:#2b3234;color:#efe9e2}
html[data-theme="dark"] .sc-link-choice[aria-pressed=true]{background:#2f4a43;border-color:#5fae96}
/* The header (Nicolas, 4 November; plan stone-constellations/sc-header-levels-plan.md). Left: Home's menu, 40 px boxes
   (the logo or the client's photo leads Home). Middle: the level pill. Right, ending at the edge: the bin, Search,
   + Constellation and the Timeline. One 72 px row on a computer; two rows on phones, the left menu centred on top. */
.topbar{height:72px!important;display:grid!important;grid-template-columns:auto minmax(0,1fr) auto!important;align-items:center;gap:16px!important;padding-right:10px!important}
main,.event-panel{top:72px!important}
.topbar .brand{display:block!important;grid-column:1!important;grid-row:1!important;font:inherit;letter-spacing:0}
.sc-title-row{display:flex;align-items:center;gap:8px}
.sc-title-row .brand-mark{order:0;margin-right:6px}
#scSignOut{order:1}#scAccount{order:2}#scChatBell{order:3}#scAppearanceButton{order:4}.sc-title-row #atelier-feedback{order:5!important}#scReopen{order:6}
@media(min-width:601px){#scHome{display:none!important}}
.sc-box{position:relative;display:inline-grid;place-items:center;flex:0 0 40px;width:40px;height:40px;padding:0;border:1px solid #deded9;border-radius:9px;background:#fffdf9;color:#242423;text-decoration:none;cursor:pointer;letter-spacing:0;box-shadow:none;box-sizing:border-box}
.sc-box:hover{background:#f1efe9}
.sc-box svg,.sc-box .ico{display:block;width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
.sc-box[hidden]{display:none!important}
.sc-box .sc-trash-count{top:-4px;right:-4px}
.sc-box .sc-bell-dot{top:-3px;right:-3px}
html[data-theme="dark"] .sc-box{background:#283032;border-color:#3d4648;color:#efe9e2}
html[data-theme="dark"] .sc-box:hover{background:#394345}
/* The right side: boxes for the bin, Search and the Timeline; + Constellation stays a wide orange button. */
.topbar .topactions{grid-column:3!important;grid-row:1!important;width:auto!important;max-width:none!important;display:flex!important;align-items:center;justify-content:flex-end!important;gap:8px!important;padding:0!important;margin:0!important}
html body .topbar .topactions .sc-box{display:inline-grid!important;flex:0 0 40px!important;width:40px!important;min-width:40px!important;height:40px!important;padding:0!important;border:1px solid #deded9!important;border-radius:9px!important;background:#fffdf9!important;color:#242423!important;box-shadow:none!important}
html body .topbar .topactions .sc-box:hover{background:#f1efe9!important}
html body .topbar .topactions .sc-box.sc-timeline{flex-basis:80px!important;width:80px!important;min-width:80px!important}
html body .topbar .topactions .sc-box.sc-timeline svg{width:48px;height:24px;stroke-width:1.6}
html body .topbar .topactions .sc-box[data-header-selected="true"]{background:#dff3ec!important;border-color:#91d9c1!important;color:#1f3d35!important}
html body .topbar .topactions .sc-add,html body .topbar .topactions .sc-add[data-header-selected="true"]{flex:0 0 auto!important;width:auto!important;min-width:0!important;height:40px!important;padding:0 18px!important;border:1px solid #d06f56!important;border-radius:9px!important;background:#d06f56!important;color:#fff!important;font:15px Arial,Helvetica,sans-serif!important;white-space:nowrap}
html body .topbar .topactions .sc-add:hover{background:#bf5f47!important;border-color:#bf5f47!important}
html[data-theme="dark"] body .topbar .topactions .sc-box{background:#283032!important;border-color:#3d4648!important;color:#efe9e2!important}
html[data-theme="dark"] body .topbar .topactions .sc-box:hover{background:#394345!important}
html[data-theme="dark"] body .topbar .topactions .sc-box[data-header-selected="true"]{background:#2f4a43!important;border-color:#5fae96!important;color:#f2eee7!important}
.topbar .savenote{display:none!important}
/* The level pill (shared/atelier-levels.css) in the middle of the header. */
.topbar #lv-btn{z-index:6}
/* The row of five levels under the header: the work area moves down while it is open. */
#lv-row{position:absolute!important;top:72px;left:0;right:0;z-index:40}
body.lv-row-open main,body.lv-row-open .event-panel{top:149px!important}
/* Phones: the left menu centred on top (Sign Out, the photo or the house, Settings, Chat); the pill and the right side under it. */
@media(max-width:720px){
  .topbar{height:118px!important;display:flex!important;flex-direction:row!important;flex-wrap:wrap!important;align-content:center;justify-content:center;row-gap:6px!important;column-gap:8px!important;padding:6px 8px!important}
  main,.event-panel{top:118px!important}
  .topbar .brand{width:100%;padding:0!important}
  .sc-title-row{justify-content:center!important}
  .topbar #lv-btn{position:static;transform:none;order:1;height:40px;padding:0 8px 0 10px;gap:4px}
  .topbar #lv-btn .lv-name{display:none}
  .topbar .topactions{order:2;width:auto!important}
  html body .topbar .topactions .sc-box.sc-timeline{flex-basis:60px!important;width:60px!important;min-width:60px!important}
  html body .topbar .topactions .sc-add,html body .topbar .topactions .sc-add[data-header-selected="true"]{padding:0 12px!important;font-size:14px!important}
  #lv-row{top:118px}
  body.lv-row-open main,body.lv-row-open .event-panel{top:183px!important}
}
@media(max-width:600px){
  .sc-title-row .brand-mark{display:none!important}
  /* Sign Out, then Home (the photo, or the house before one is uploaded) in the middle, then Settings (Home #1274). */
  #scSignOut{order:-3!important}
  #scHome,.sc-title-row .brand-mark{order:-2!important}
  #scAccount{order:-1!important}
  /* Home's phone row is Sign Out, Home, Settings (Design Review, 4 November): Chat stays on a computer. */
  #scChatBell{display:none!important}
  .topbar:has(.brand-mark.has-photo) #scHome{display:none!important}
  #scSignOut svg{transform:scaleX(-1)}
}
/* The logo 10px from the left edge on every page (Nicolas, 31 October). */
@media(min-width:721px){.topbar{padding-left:10px!important}.topbar .brand{padding-left:0!important;margin-left:0!important}}

/* The three steps as editor tabs (Nicolas, 4 November): a joined row at the top left of the work area, the open one in
   the aqua tint used for toggles; Scatter Again and the Stones / Characters switch at the row's right end. */
.sc-tabrow{display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:flex-start!important;gap:8px;padding:14px 18px 10px!important;margin:0!important;box-sizing:border-box}
.sc-tabrow .btn{margin:0!important;align-self:center!important}
.sc-tabrow-end{margin-left:auto;display:flex;align-items:center;gap:8px}
.sc-tabrow-end .pile-family{margin:0}
.boardwrap>.sc-tabrow{position:absolute;top:0;left:0;z-index:6;padding:14px 18px!important;pointer-events:none}
.boardwrap>.sc-tabrow>*{pointer-events:auto}
nav.sc-tabs{display:inline-flex!important;flex:none;gap:0!important;margin:0!important;padding:0!important;border:1px solid var(--line,#deded9);border-radius:9px;overflow:hidden;background:var(--panel,#fffdf9);order:0}
nav.sc-tabs .tab{display:inline-flex!important;align-items:center;justify-content:center;width:auto!important;min-width:0!important;flex:none!important;height:36px!important;padding:0 16px!important;margin:0!important;border:0!important;border-radius:0!important;background:transparent!important;color:var(--ink,#242423)!important;font:13px Arial,Helvetica,sans-serif!important;box-shadow:none!important;cursor:pointer;white-space:nowrap}
nav.sc-tabs .tab+.tab{border-left:1px solid var(--line,#deded9)!important}
nav.sc-tabs .tab:hover{background:#f1efe9!important}
nav.sc-tabs .tab.active,nav.sc-tabs .tab.active:hover{background:#dff3ec!important;color:#1f3d35!important}
html[data-theme="dark"] nav.sc-tabs{background:#283032;border-color:#3d4648}
html[data-theme="dark"] nav.sc-tabs .tab{color:#efe9e2!important}
html[data-theme="dark"] nav.sc-tabs .tab+.tab{border-left-color:#3d4648!important}
html[data-theme="dark"] nav.sc-tabs .tab:hover{background:#394345!important}
html[data-theme="dark"] nav.sc-tabs .tab.active{background:#2f4a43!important;color:#f2eee7!important}
/* Phones: the tabs fill the row; the other controls go under them. */
@media(max-width:720px){
  .sc-tabrow{flex-wrap:wrap;padding:10px 12px 6px!important}
  .pilewrap>.panelhead.sc-tabrow{display:flex!important}
  nav.sc-tabs{display:flex!important;width:100%}
  nav.sc-tabs .tab{flex:1 1 0!important;padding:0 6px!important}
  .sc-tabrow-end{margin-left:0;width:100%}
  .boardwrap>.sc-tabrow{right:0;padding:10px 12px!important}
}

/* What a level has not opened is hidden, not greyed (sc-levels.js). */
body.sc-off-scPlaces nav.sc-tabs .tab[data-view="3"],body.sc-off-scPlaces #btnBackPlaces,body.sc-off-scPlaces #btnNextPlaces,
body.sc-off-scCharacters .pile-family,body.sc-off-scCharacters .poolitem .sc-link,body.sc-off-scCharacters .sc-link-grid,body.sc-off-scCharacters .sc-swap,
body.sc-off-scOverTime #historyBar,
body.sc-off-scLoops #scLoopsButton,body.sc-off-scLoops #scLoopsPanel,
body.sc-off-scExport .series-actions .sc-export,body.sc-off-scExport .import-panel-button{display:none!important}
body.sc-off-scOverTime .boardwrap.has-history .board{bottom:0!important}
body.sc-off-scOverTime .boardwrap.has-history .zoombar{bottom:14px!important}
/* Scatter Again and the switch as tall as the tabs, so the row reads as one line. */
.sc-tabrow-end>.btn,.sc-tabrow-end .pile-family{height:36px!important;box-sizing:border-box}
.sc-tabrow-end>.btn{display:inline-flex!important;align-items:center;padding:0 14px!important;font-size:13px!important}
.sc-tabrow-end .pile-family .btn{height:100%!important;padding:0 12px!important;font-size:13px!important}
/* Narrow phones (360 px): the second row stays one row. */
@media(max-width:380px){
  .topbar{column-gap:6px!important;padding:6px 6px!important}
  .topbar .topactions{gap:6px!important}
  html body .topbar .topactions .sc-box.sc-timeline{flex-basis:48px!important;width:48px!important;min-width:48px!important}
  html body .topbar .topactions .sc-box.sc-timeline svg{width:40px;height:20px}
  html body .topbar .topactions .sc-add,html body .topbar .topactions .sc-add[data-header-selected="true"]{padding:0 9px!important;font-size:13px!important}
  .topbar #lv-btn{padding:0 6px 0 8px}
}
/* Older details (Design Review, 4 November): a chosen Moment or Period in the aqua tint with its line, as other
   toggles; clearing buttons in the app's orange for stop actions, not dark red. */
html body #eventPanel :is(#eventMoment,#eventPeriod)[aria-pressed="true"]{background:#dff3ec!important;border-color:#91d9c1!important;color:#1f3d35!important}
html[data-theme="dark"] body #eventPanel :is(#eventMoment,#eventPeriod)[aria-pressed="true"]{background:#2f4a43!important;border-color:#5fae96!important;color:#f2eee7!important}
html body #view2 #btnReset,html body #view2 #clearBoard,html body .restart,html body button.btn.danger,html body .event-panel button.danger,html body .timeline-tools button.btn.danger{background:#d06f56!important;border-color:#d06f56!important;color:#fff!important}
html body #view2 #btnReset:hover,html body #view2 #clearBoard:hover,html body .restart:hover,html body button.btn.danger:hover,html body .event-panel button.danger:hover{background:#bf5f47!important;border-color:#bf5f47!important}
/* Design Review round 1 on #1289 (4 November): placeholders instead of labels, nothing under 12px, "+" in aqua, palette orange on selection cards. */
.sc-sr{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;white-space:nowrap!important}
html body #eventPanel label[for="eventTitle"]:empty,html body #eventPanel label[for="eventStart"]:empty{display:none!important}
html body #eventPanel .date-parts label{font-size:12px!important}
html body #eventPanel .date-parts input,html body #eventPanel .date-parts select{margin-top:0!important;font-size:14px!important}
html body #eventPanel label[for="eventStart"],html body #eventPanel label[for="eventEnd"]{font-size:13px!important}
html body .stone-label{font-size:12px!important}
html body .topbar .topactions .sc-add,html body .topbar .topactions .sc-add[data-header-selected="true"],html body .topbar #editEvent.sc-add,html body .topbar #editEvent.sc-add[aria-expanded]{display:inline-flex!important;align-items:center;gap:6px;background:#91d9c1!important;border-color:#91d9c1!important;color:#1f3d35!important}
html body .topbar .topactions .sc-add:hover,html body .topbar #editEvent.sc-add:hover{background:#7fcdb3!important;border-color:#7fcdb3!important}
html body .topbar .topactions .sc-add svg{width:18px;height:18px;flex:0 0 18px}
html body .poolitem .x{color:#d06f56!important}
html body .poolitem .x:hover{color:#bf5f47!important}
html body #btnClearSel,html body #btnClearPlaces{border:1px solid #d06f56!important;border-radius:6px!important;background:transparent!important;color:#d06f56!important;padding:5px 10px!important}
html body #btnClearSel:hover,html body #btnClearPlaces:hover{background:rgba(208,111,86,.1)!important}
html[data-theme="dark"] body #btnClearSel,html[data-theme="dark"] body #btnClearPlaces{color:#e48a72!important;border-color:#e48a72!important}
/* Design Review on #1318 (4 November): the × on a selection card is a plain × in dark mode too, no light square; the tap area stays 44px on phones. */
html[data-theme="dark"] body .poolitem .x,html[data-theme="dark"] body .poolitem .x:hover{background:transparent!important;border-color:transparent!important;box-shadow:none!important}
@media(max-width:700px){html body .poolitem .x{min-width:44px!important;min-height:44px!important}}
