/* The field: plain text in depth. Shares the board's look (board.css); only what's new lives here. */
#c { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }

/* writing: the field steps back and your thought sits flat in front of you */
#writing { position: absolute; left: 24px; right: 24px; top: calc(18vh + var(--vv-top)); z-index: 5; }
#writing[hidden] { display: none; }
#w-text { min-height: 1.2em; font-size: 30px; line-height: 1.16; font-weight: 450; letter-spacing: -0.035em; outline: none;
  white-space: pre-wrap; overflow-wrap: anywhere; -webkit-user-select: text; user-select: text; caret-color: currentColor; }
#w-text:empty::before { content: 'write a thought'; color: var(--deep, #71329D); }
#w-by { margin-top: 12px; font-size: 15px; font-weight: 600; }
body.writing #c { opacity: .28; transition: opacity .25s; }
#c { transition: opacity .25s; }
body.writing #tools, body.carrying #tools { opacity: 0; pointer-events: none; }

/* a thought's page: the thought big, more writing under it, the thoughts it's joined to */
#page { position: absolute; inset: 0; z-index: 8; background: var(--ground); overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: calc(20px + var(--safe-t)) 24px calc(60px + var(--safe-b)); touch-action: pan-y; }
#page[hidden] { display: none; }
#p-back { height: 44px; padding: 0 18px; margin-left: -6px; border-radius: 999px; background: var(--ink); color: var(--ground);
  font-size: 15px; font-weight: 500; }
#p-text { margin-top: 36px; font-size: 40px; line-height: 1.08; font-weight: 470; letter-spacing: -0.04em; outline: none;
  white-space: pre-wrap; overflow-wrap: anywhere; -webkit-user-select: text; user-select: text; }
#p-by { margin-top: 12px; font-size: 15px; font-weight: 600; }
#p-more { margin-top: 28px; min-height: 3em; font-size: 20px; line-height: 1.4; font-weight: 420; outline: none;
  white-space: pre-wrap; overflow-wrap: anywhere; -webkit-user-select: text; user-select: text; }
#p-more:empty::before { content: 'write more'; color: var(--deep, #71329D); }
#p-joined-h { margin-top: 40px; font-size: 14px; font-weight: 600; }
#p-joined-h.none { display: none; }
#p-joined { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
#p-joined button { text-align: left; font-size: 22px; line-height: 1.2; font-weight: 450; letter-spacing: -0.03em; padding: 8px 0; }
body.paging #tools, body.paging #people { opacity: 0; pointer-events: none; }

/* in a framework, the welcome sits at the top so the framework itself stays in view */
body.framed #intro { top: calc(84px + var(--safe-t)); transform: none; }
body.framed #intro h1 { font-size: 28px; }

/* inside a zone: its name (tap to come back out) and its list */
#zone { position: absolute; left: 50%; top: calc(18px + var(--safe-t) + var(--vv-top)); transform: translateX(-50%); z-index: 6;
  display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--ink); }
#zone[hidden] { display: none; }
#zone button { height: 40px; padding: 0 16px; border-radius: 999px; color: var(--ground); font-size: 16px; font-weight: 560; }
#z-list { background: var(--ground) !important; color: var(--ink) !important; }
#zlist { position: absolute; left: 0; right: 0; bottom: 0; max-height: 70%; z-index: 9; background: var(--ground); border-radius: 24px 24px 0 0;
  padding: 18px 24px calc(28px + var(--safe-b)); overflow-y: auto; touch-action: pan-y; box-shadow: 0 -1px 0 rgba(11,10,10,.08); }
#zlist[hidden] { display: none; }
#zl-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
#zl-title { font-size: 28px; font-weight: 600; letter-spacing: -0.04em; }
#zl-close { height: 40px; padding: 0 16px; border-radius: 999px; background: var(--ink); color: var(--ground); font-size: 15px; font-weight: 500; }
#zl-items { display: flex; flex-direction: column; }
#zl-items button { text-align: left; font-size: 21px; line-height: 1.25; font-weight: 460; letter-spacing: -0.03em; padding: 10px 0; }
.zl-empty { font-size: 18px; color: #71329D; padding: 8px 0; }
/* in a framework the welcome sits low, in the empty space above "write", clear of the shapes */
body.framed #intro { top: auto; bottom: calc(118px + var(--safe-b) + var(--vv-gap)); transform: none; }
body.framed #intro h1 { font-size: 24px; margin-bottom: 6px; }
body.framed #intro p { font-size: 15px; }

/* inside a saved world: its name, and the way back to your worlds */
#worldbar { position: absolute; left: 16px; top: calc(16px + var(--safe-t) + var(--vv-top)); z-index: 6; display: flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 14px 0 6px; border-radius: 999px; background: var(--ink); color: var(--ground); text-decoration: none; font-size: 14px; max-width: calc(100vw - 110px); }
#worldbar .wb-home { height: 26px; padding: 0 10px; border-radius: 999px; background: var(--ground); color: var(--ink); display: grid; place-items: center; font-weight: 600; flex: none; }
#worldbar .wb-title { font-weight: 520; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.paging #worldbar, body.writing #worldbar { opacity: 0; pointer-events: none; }
