/* ─────────────────────────────────────────
   Workroom — studio lemonpeel
   "Side A / Side B" type-block office
   ───────────────────────────────────────── */
:root {
  --sans: "Inter Tight", "Pretendard", "Noto Sans KR", -apple-system, BlinkMacSystemFont, sans-serif;
  --outside: #f4f4f2;
}
/* theme variants — 박스 없이 배경색 한 가지 + 글씨. 보조 글씨(--meta)·선은 글씨색의 투명도로 */
[data-theme="lime"]  { --bg: #d3e479; --block: transparent; --ink: #2e2e2e; --meta: rgba(46,46,46,.45);   --line: rgba(46,46,46,.16);   --hover: rgba(255,255,255,.28); --accent: #2e2e2e; --late: #e2412c; }
[data-theme="lemon"] { --bg: #fbf0b9; --block: transparent; --ink: #df1f26; --meta: rgba(223,31,38,.45);  --line: rgba(223,31,38,.2);   --hover: rgba(255,255,255,.45); --accent: #df1f26; --late: #df1f26; }
[data-theme="green"] { --bg: #4f9b4b; --block: transparent; --ink: #ffffff; --meta: rgba(255,255,255,.5);  --line: rgba(255,255,255,.3);  --hover: rgba(255,255,255,.1);  --accent: #ffffff; --late: #ffe066; }
[data-theme="white"] { --bg: #f2f2f0; --block: transparent; --ink: #161616; --meta: rgba(22,22,22,.38);    --line: rgba(22,22,22,.12);   --hover: rgba(0,0,0,.035);      --accent: #161616; --late: #e2412c; }
[data-theme="gray"]  { --bg: #cfcfcd; --block: transparent; --ink: #2e2e2e; --meta: rgba(46,46,46,.45);   --line: rgba(0,0,0,.14);      --hover: rgba(255,255,255,.3);  --accent: #2e2e2e; --late: #d93a2b; }
[data-theme="black"] { --bg: #151515; --block: transparent; --ink: #f1f1f1; --meta: rgba(241,241,241,.4); --line: rgba(241,241,241,.14); --hover: rgba(255,255,255,.06); --accent: #f1f1f1; --late: #ff7a66; }

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; }
body {
  background: var(--outside);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.3;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; text-align: left; }
input, select, textarea { font: inherit; color: inherit; }
.hidden { display: none !important; }
.g { color: var(--meta); }

/* ───────── FRAME ───────── */
.frame {
  position: relative;
  margin: 24px;
  min-height: calc(100vh - 48px);
  background: var(--bg);
  border-radius: 10px;
  padding: 10px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .1);
  overflow: hidden;
  display: flex; flex-direction: column;
}
.grain {
  position: absolute; inset: 0; pointer-events: none; opacity: .28; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .5  0 0 0 0 .5  0 0 0 0 .5  0 0 0 .35 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
[data-theme="black"] .grain { mix-blend-mode: screen; opacity: .12; }
.frame > *:not(.grain) { position: relative; }
#app, #lock { flex: 1; display: flex; flex-direction: column; }
#view { flex: 1; display: flex; flex-direction: column; }

.info {
  position: absolute !important; top: 12px; right: 11px; z-index: 3;
  width: 26px; height: 26px; border: 2px solid var(--ink); border-radius: 50%;
  display: grid; place-items: center; font-weight: 600; font-size: 14px; line-height: 1;
}
.info:hover { background: var(--ink); color: var(--bg); }

/* ───────── TYPE BLOCK ───────── */
.ledger { background: var(--block); }
.row {
  display: flex; align-items: baseline; gap: .22em;
  font-size: clamp(22px, 2.58vw, 64px);
  font-weight: 500; letter-spacing: -.04em; line-height: 1.0;
  min-height: 1em;
  /* g·p·y 꼬리가 잘리지 않게: 아래 여유 .12em, 같은 만큼 당겨서 줄 간격은 그대로 */
  padding-bottom: .12em; margin-bottom: -.1em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.row > .t { overflow: hidden; text-overflow: ellipsis; padding-bottom: .12em; margin-bottom: -.12em; }
.row .g { flex-shrink: 0; letter-spacing: -.03em; }
.row sup { display: none; }
a.row, button.row, .row.click { cursor: pointer; -webkit-tap-highlight-color: transparent; }
@media (hover: hover) {
  a.row:hover, button.row:hover, .row.click:hover { text-decoration: underline; text-decoration-thickness: .06em; text-underline-offset: .1em; }
}
a.row:active, button.row:active, .row.click:active { text-decoration: underline; text-decoration-thickness: .06em; text-underline-offset: .1em; }
.row.current::after { content: "←"; margin-left: .2em; }
.row.empty { color: var(--meta); }
.row.add { color: var(--meta); }
.row.add:hover { color: var(--ink); }
button.row { width: 100%; }

.ledger.md .row { font-size: clamp(22px, 2.58vw, 64px); }
.ledger.sm .row { font-size: 20px; letter-spacing: -.03em; line-height: 1.15; }
.ledger.sm .row .g { font-size: .8em; }

.caption {
  display: inline-block; background: var(--block);
  font-size: 11px; font-weight: 500; line-height: 1.22; letter-spacing: 0;
}
.caption a { text-decoration: underline; text-underline-offset: 2px; }
.caption .g { font-weight: 400; }

/* ───────── LOCK ───────── */
.lock:not(.hidden) { display: grid !important; }
.lock { gap: 0 10px; padding-right: 42px; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr auto; }
.lock .ledger { align-self: start; }
.lock input {
  flex: 1; min-width: 0; background: transparent; border: 0; outline: none;
  font-size: 1em; font-weight: 500; letter-spacing: .02em; color: var(--ink);
}
.lock input::placeholder { color: var(--meta); letter-spacing: -.04em; }
.lock button:hover { text-decoration: underline; }
.lock-error { color: var(--late); font-size: .5em; letter-spacing: -.01em; }
.foot-a { grid-column: 1; align-self: end; justify-self: start; margin-top: 10px; }
.foot-b { grid-column: 2; align-self: end; justify-self: start; margin-top: 10px; }
.shake { animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-8px); } 50% { transform: translateX(8px); } 75% { transform: translateX(-4px); } }

/* ───────── LAYOUT ───────── */
.home {
  flex: 1; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr auto; gap: 0 10px;
  padding-right: 42px;
}
.home > .ledger { align-self: start; }

.page {
  flex: 1; display: grid; grid-template-columns: 1fr 2fr; grid-template-rows: 1fr auto;
  gap: 0 10px; align-items: start; padding-right: 42px;
}
.page-side { position: sticky; top: 0; }
.page-main { min-width: 0; display: grid; gap: 10px; }
.page-main > * { background: var(--block); }

.toolbar { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 14px; font-weight: 500; letter-spacing: -.01em; padding: 2px 0; }
.toolbar button { color: var(--meta); }
.toolbar button:hover, .toolbar button.on { color: var(--ink); }

/* ───────── CALENDAR ───────── */
.cal-head { justify-content: space-between; }
.cal-head .arrows { display: flex; gap: .4em; }
.cal-head .arrows button:hover { text-decoration: underline; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); border-top: 1px solid var(--line); }
.cal-dow { font-size: 12px; font-weight: 500; color: var(--meta); padding: 6px 8px; border-bottom: 1px solid var(--line); }
.cal-day {
  min-height: 112px; padding: 6px 8px; cursor: pointer; overflow: hidden;
  border-bottom: 1px solid var(--line); border-right: 1px solid var(--line);
}
.cal-day:nth-child(7n) { border-right: 0; }
.cal-day:hover { background: var(--hover); }
.cal-day.other .num { color: var(--meta); }
.cal-day .num { font-size: 22px; font-weight: 500; letter-spacing: -.04em; line-height: 1; }
.cal-day.today .num { display: inline-block; background: var(--ink); color: var(--bg); padding: 2px 5px 1px; }
.cal-ev {
  font-size: 12px; font-weight: 500; letter-spacing: -.01em; line-height: 1.3; margin-top: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer;
}
.cal-ev:hover { text-decoration: underline; }
.cal-ev.deadline { color: var(--late); }
.cal-ev.task { color: var(--meta); }

/* ───────── KANBAN ───────── */
.page-main > .kanban { background: transparent; }
.kanban { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.col { background: var(--block); min-height: 280px; align-self: start; transition: outline .1s; }
.col.over { outline: 3px solid var(--ink); }
.task-row { cursor: grab; }
.task-row.dragging { opacity: .3; }
.task-row .late { color: var(--late); }

/* ───────── NOTES ───────── */
.page-main > .notes { background: transparent; }
.notes { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.note { background: var(--block); padding: 2px 0 12px; cursor: pointer; align-self: start; }
.note h4 { font-size: 30px; font-weight: 500; letter-spacing: -.045em; line-height: 1.05; margin-bottom: 8px; }
.note:hover h4 { text-decoration: underline; text-decoration-thickness: 2px; }
.note p {
  white-space: pre-wrap; font-size: 14px; font-weight: 500; letter-spacing: -.01em; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 8; -webkit-box-orient: vertical; overflow: hidden;
}
.note .caption { color: var(--meta); margin-top: 10px; display: block; }
.note.pinned h4::after { content: " (고정)"; color: var(--meta); }

/* ───────── SETTINGS ───────── */
.set-block { padding: 0 0 14px; }
.set-block h4 { font-size: 36px; font-weight: 500; letter-spacing: -.045em; line-height: 1.05; }
.set-block p { color: var(--meta); font-weight: 500; margin: 6px 0 10px; max-width: 560px; }
.links-inline { display: flex; gap: 6px 16px; flex-wrap: wrap; font-weight: 500; font-size: 15px; }
.links-inline button, .links-inline label { text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.links-inline .on { text-decoration: none; background: var(--ink); color: var(--bg); padding: 0 6px; }
.links-inline .danger { color: var(--late); }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; border: 1px solid rgba(0,0,0,.15); vertical-align: 0; }

/* ───────── MODAL ───────── */
.modal {
  position: fixed; inset: 0; z-index: 50; padding: 22px;
  background: rgba(0, 0, 0, .28); display: grid; place-items: center;
}
.modal-card {
  width: min(620px, 100%); max-height: calc(100vh - 44px); overflow: auto;
  background: #fff; color: #2e2e2e; border-radius: 12px; padding: 18px 22px 22px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .25);
}
[data-theme="black"] .modal-card { background: #1d1d1d; color: #f1f1f1; }
.modal-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.modal-head h3 { font-size: 46px; font-weight: 500; letter-spacing: -.05em; line-height: 1; }
.x { font-size: 18px; color: #bbb; }
.x:hover { color: inherit; }

.field { display: grid; grid-template-columns: 96px 1fr; align-items: baseline; gap: 12px; border-top: 1px solid #ececec; padding: 7px 0; }
[data-theme="black"] .field { border-color: #333; }
.field > label { font-size: 12px; font-weight: 500; color: #aaa; }
.field input, .field select, .field textarea {
  width: 100%; background: transparent; border: 0; outline: none;
  font-size: 22px; font-weight: 500; letter-spacing: -.035em; color: inherit;
}
.field input::placeholder, .field textarea::placeholder { color: #d0d0d0; }
[data-theme="black"] .field input::placeholder, [data-theme="black"] .field textarea::placeholder { color: #555; }
.field select option { color: #222; }
.field textarea { min-height: 110px; resize: vertical; line-height: 1.3; font-size: 18px; letter-spacing: -.02em; }
/* 날짜: 기기 기본 날짜 칸은 투명하게 두고(달력·휠은 그대로), 위에 2026.11.16 형식으로 표시 */
.date-in { position: relative; display: block; }
.date-in input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.date-show { display: block; pointer-events: none; white-space: nowrap; }
.field .date-show { font-size: 22px; font-weight: 500; letter-spacing: -.035em; }
.date-show.empty { color: #d0d0d0; }
[data-theme="black"] .date-show.empty { color: #555; }
/* 시간: 시(00–23) · 분(5분 단위) 선택 칸, 24시간제 */
.time-in { display: flex; align-items: baseline; gap: 2px; }
.field .time-in select { width: auto; -webkit-appearance: none; appearance: none; padding: 0; cursor: pointer; font-variant-numeric: tabular-nums; }
.time-in:not(.empty) .t-h, .time-in .t-m { width: 1.15em; }
.time-in .t-sep { font-size: 22px; font-weight: 500; }
.time-in.empty .t-sep, .time-in.empty .t-m { display: none; }
.checks { display: grid; gap: 2px; }
/* Contract '조건 더보기' */
details.cond { border-top: 1px solid #ececec; padding: 8px 0 4px; }
details.cond summary { cursor: pointer; font-size: 13px; font-weight: 500; color: #aaa; list-style: none; }
details.cond summary::-webkit-details-marker { display: none; }
details.cond summary::before { content: "+ "; }
details.cond[open] summary::before { content: "− "; }
details.cond summary:hover { text-decoration: underline; }
details.cond .field > label { font-size: 11px; }
[data-theme="black"] details.cond { border-color: #333; }
.checks label { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 500; letter-spacing: -.035em; cursor: pointer; }
.checks input { width: 16px; height: 16px; accent-color: #2e2e2e; }

.log { list-style: none; display: grid; gap: 8px; margin-top: 6px; }
.log li { font-size: 17px; font-weight: 500; letter-spacing: -.025em; line-height: 1.3; }
.log .caption { background: none; color: #aaa; display: block; font-size: 12px; }
.log-add { display: flex; gap: 10px; }
.log-add input { flex: 1; background: transparent; border: 0; border-bottom: 1px solid #e3e3e3; outline: none; font-size: 17px; font-weight: 500; padding: 3px 0; }
.log-add button { font-weight: 500; }

.actions { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; border-top: 1px solid #ececec; padding-top: 10px; }
[data-theme="black"] .actions { border-color: #333; }
.actions .right { display: flex; gap: 18px; margin-left: auto; }
.actions button { font-size: 26px; font-weight: 500; letter-spacing: -.045em; }
.actions button:hover { text-decoration: underline; }
.actions .danger { color: #e2412c; font-size: 13px; letter-spacing: 0; text-decoration: underline; }

.toast {
  position: fixed; bottom: 36px; left: 50%; transform: translateX(-50%); z-index: 60;
  background: #2e2e2e; color: #fff; padding: 7px 14px; font-size: 13px; font-weight: 500;
}

/* ───────── RESPONSIVE ───────── */
@media (max-width: 900px) {
  .frame { margin: 8px; padding: 14px; min-height: calc(100vh - 16px); }
  .info { top: 14px; right: 14px; }
  .home, .page, .lock { grid-template-columns: 1fr; padding-right: 0; gap: 10px !important; }
  .home { padding-top: 40px; }
  .page { padding-top: 40px; }
  .page-side { position: static; }
  .foot-a, .foot-b { grid-column: 1; padding-top: 0; }
  .kanban { grid-template-columns: 1fr; }
  .cal-day { min-height: 64px; padding: 4px; }
  .cal-day .num { font-size: 15px; }
  .cal-ev { font-size: 9px; }
  .field { grid-template-columns: 1fr; gap: 0; }
}

.page-side .row { font-size: clamp(22px, 2.58vw, 64px); }
.page-side .row > .t { flex-shrink: 0; }
.cal-head .arrows .g { font-size: .55em; align-self: center; }

/* ───────── v3: paperwork / studio ───────── */
.tabs { display: flex; flex-wrap: wrap; gap: 0 .5em; }
.tabs .row { width: auto; color: var(--meta); }
.tabs .row.on { color: var(--ink); }
.tabs .cnt { font-size: .36em; align-self: flex-start; margin-top: .3em; letter-spacing: 0; }
.hint { font-size: 13px; font-weight: 500; color: var(--meta); padding: 6px 0 10px; max-width: 640px; }
.block-hint { background: transparent !important; color: var(--ink); opacity: .7; padding: 0; }
.chip { width: .62em; height: .62em; border-radius: 50%; flex-shrink: 0; align-self: center; border: 1px solid rgba(0,0,0,.12); margin-right: .1em; }

.modal-card.wide { width: min(820px, 100%); }
.modal-sub { font-size: .36em; letter-spacing: -.01em; color: #bbb; font-weight: 500; }
.doc-sec { margin-top: 22px; }
.doc-sec h5 { display: flex; justify-content: space-between; align-items: baseline; font-size: 30px; font-weight: 500; letter-spacing: -.045em; line-height: 1.1; border-bottom: 2px solid currentColor; padding-bottom: 4px; }
.mini { font-size: 13px; font-weight: 500; letter-spacing: 0; text-decoration: underline; text-underline-offset: 3px; padding: 6px 0; }
.mini:hover { opacity: .6; }
.item-head, .item-row { display: grid; grid-template-columns: 1fr 70px 130px 24px; gap: 10px; align-items: center; }
.item-head { font-size: 12px; color: #aaa; font-weight: 500; padding: 8px 0 2px; }
.item-row { border-bottom: 1px solid #ececec; padding: 4px 0; }
[data-theme="black"] .item-row { border-color: #333; }
.item-row input { width: 100%; background: transparent; border: 0; outline: none; font-size: 18px; font-weight: 500; letter-spacing: -.02em; color: inherit; padding: 4px 0; }
.item-row input[type="number"] { text-align: right; }
.item-row input::placeholder { color: #d0d0d0; }
.sum { display: grid; gap: 2px; padding: 10px 0 0; }
.sum > span, .sum > strong { display: inline; }
#sumBox { display: flex; justify-content: space-between; font-size: 24px; font-weight: 500; letter-spacing: -.04em; }
#invBox > div { display: grid; grid-template-columns: 1fr auto 120px; gap: 10px; font-size: 17px; font-weight: 500; letter-spacing: -.02em; padding: 3px 0; border-bottom: 1px solid #f0f0f0; }
#invBox > div em { font-style: normal; color: #aaa; font-size: 13px; text-align: right; align-self: center; }
#invBox .net { font-size: 24px; letter-spacing: -.04em; border-bottom: 0; }
.link-out { font-size: 15px; font-weight: 500; text-decoration: underline; word-break: break-all; }
@media (max-width: 900px) {
  .item-head, .item-row { grid-template-columns: 1fr 50px 90px 20px; gap: 6px; }
  #invBox > div { grid-template-columns: 1fr auto; }
  #invBox > div em { display: none; }
}
.item-main { display: grid; }
.item-row input.detail { font-size: 14px; color: #888; padding-top: 0; }
.item-row { align-items: start; }
.deliv-head, .deliv-row { display: grid; grid-template-columns: 1fr 150px 60px 24px; gap: 10px; align-items: center; }
.deliv-head { font-size: 12px; color: #aaa; font-weight: 500; padding: 8px 0 2px; }
.deliv-row { border-bottom: 1px solid #ececec; padding: 4px 0; }
.deliv-row input { width: 100%; background: transparent; border: 0; outline: none; font-size: 18px; font-weight: 500; letter-spacing: -.02em; color: inherit; padding: 4px 0; }
.deliv-row input[type="number"] { text-align: right; }
.deliv-row input::placeholder { color: #d0d0d0; }
.row.todo { gap: .3em; }
.tick { flex-shrink: 0; width: 1.1em; font-size: .7em; line-height: 1; align-self: center; color: inherit; text-align: center; }
.tick:hover { opacity: .5; }
.row.todo .t.click { cursor: pointer; }
@media (hover: hover) { .row.todo .t.click:hover { text-decoration: underline; text-decoration-thickness: .06em; } }
.row.todo.done { color: var(--meta); text-decoration: line-through; text-decoration-thickness: .05em; }
.row.todo.done .tick { text-decoration: none; }
.todo-add { color: var(--meta); }
.todo-add input { flex: 1; min-width: 0; background: transparent; border: 0; outline: none; font: inherit; letter-spacing: inherit; color: var(--ink); }
.todo-add input::placeholder { color: var(--meta); }
.done-list { margin-top: 6px; }

/* confirm dialog */
.ask { position: fixed; inset: 0; z-index: 80; background: rgba(0,0,0,.28); display: grid; place-items: center; padding: 22px; }
.ask-card { background: #fff; color: #2e2e2e; border-radius: 12px; padding: 20px 22px 16px; width: min(380px, 100%); box-shadow: 0 30px 80px rgba(0,0,0,.25); }
.ask-card p { font-size: 22px; font-weight: 500; letter-spacing: -.035em; line-height: 1.2; margin-bottom: 18px; }
.ask-actions { display: flex; justify-content: flex-end; gap: 18px; }
.ask-actions button { font-size: 20px; font-weight: 500; letter-spacing: -.04em; }
.ask-actions [data-yes] { text-decoration: underline; text-underline-offset: 3px; }
.lock-error.info { color: var(--meta); }
.lock input:disabled { opacity: .4; }
/* schedule editor */
.sp-head, .sp-bar { display: grid; grid-template-columns: 1fr 140px 140px 80px 24px; gap: 8px; align-items: center; }
.sp-head { font-size: 12px; color: #aaa; font-weight: 500; padding: 8px 0 2px; }
.sp-phase { border-top: 1px solid #e3e3e3; padding: 8px 0 6px; }
.sp-phase-head { display: flex; gap: 8px; align-items: center; }
.sp-name { flex: 1; background: transparent; border: 0; outline: none; font-size: 22px; font-weight: 500; letter-spacing: -.035em; color: inherit; padding: 4px 0; }
.sp-bar { padding: 2px 0; }
.sp-bar input, .sp-bar select, .sp-meet input { width: 100%; background: transparent; border: 0; border-bottom: 1px solid #efefef; outline: none; font-size: 15px; font-weight: 500; color: inherit; padding: 5px 0; }
.sp-name::placeholder, .sp-bar input::placeholder, .sp-meet input::placeholder { color: #d0d0d0; }
.sp-bar .date-show, .sp-meet .date-show { font-size: 15px; font-weight: 500; padding: 5px 0; border-bottom: 1px solid #efefef; }
.sp-meet { display: grid; grid-template-columns: 1fr 160px 24px; gap: 8px; align-items: center; padding: 2px 0; }
@media (max-width: 900px) { .sp-head { display: none; } .sp-bar { grid-template-columns: 1fr 1fr; } .sp-bar .sp-text { grid-column: 1 / -1; } }

/* ───────── studio v2 ───────── */
.page-main > .studio-grid { background: transparent; }
.studio-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: start; }
.s-col { display: grid; gap: 10px; }
.s-block { padding-bottom: .3em; }
.s-head { position: relative; }
.s-add { margin-left: auto; font-size: .8em; line-height: 1; padding: 0 .1em; color: var(--ink); }
.s-add:hover { opacity: .5; }
.s-item { font-size: clamp(17px, 1.55vw, 26px); letter-spacing: -.03em; line-height: 1.2; }
.s-item .g { font-size: .72em; }
.s-item a.t:hover, .s-item .t.click:hover { text-decoration: underline; text-decoration-thickness: .06em; cursor: pointer; }
.s-edit { margin-left: auto; font-size: 12px; font-weight: 500; letter-spacing: 0; color: var(--meta); text-decoration: underline; text-underline-offset: 2px; flex-shrink: 0; align-self: center; }
.s-edit:hover { color: var(--ink); }
.s-head .s-edit { font-size: 13px; }
.s-hint { font-size: 11px !important; letter-spacing: 0; opacity: 0; transition: opacity .15s; }
.s-item:hover .s-hint { opacity: 1; }
.s-info { display: grid; gap: 2px; padding: 4px 0 6px; cursor: pointer; }
.s-info div { display: grid; grid-template-columns: 80px 1fr; gap: 10px; font-size: 14px; font-weight: 500; letter-spacing: -.01em; }
.s-info span { color: var(--ink); opacity: .45; }
.s-info b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.need { color: var(--late) !important; }
@media (max-width: 900px) { .studio-grid { grid-template-columns: 1fr; } }

/* ───────── 사진 · 파일 첨부 (files.js) ───────── */
.files-field { align-items: start; }
.files { min-width: 0; }
.files-bar { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; padding: 2px 0 6px; }
.files-pick { cursor: pointer; }
.files-status { font-size: 12px; color: #aaa; }
.files-drop { font-size: 12px; color: #bbb; padding: 4px 0 8px; border-radius: 6px; transition: background .12s; }
.files-drop.on { background: rgba(0,0,0,.05); color: inherit; outline: 1px dashed currentColor; padding: 18px 10px; text-align: center; }
.files-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 14px 10px; }
.file { margin: 0; min-width: 0; }
.file-thumb { position: relative; display: block; width: 100%; aspect-ratio: 1; padding: 0; background: rgba(0,0,0,.05); overflow: hidden; cursor: zoom-in; }
.file-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.file-ext { position: absolute; inset: 0; display: grid; place-items: center; font-size: 13px; font-weight: 600; letter-spacing: .04em; color: #888; }
.file-play { position: absolute; right: 6px; bottom: 4px; font-size: 12px; color: #fff; text-shadow: 0 0 4px rgba(0,0,0,.6); }
.file-cap { width: 100%; margin-top: 5px; border: 0; background: transparent; outline: none; font-size: 13px; font-weight: 500; letter-spacing: -.01em; color: inherit; padding: 0; }
.file-cap::placeholder { color: #c8c8c8; }
.file figcaption { display: flex; justify-content: space-between; align-items: baseline; font-size: 11px; color: #aaa; margin-top: 1px; }
.file-del { font-size: 11px; color: #aaa; }
.file-del:hover, .file-del:active { color: var(--late, #e2412c); text-decoration: underline; }
[data-theme="black"] .file-thumb { background: rgba(255,255,255,.06); }
[data-theme="black"] .file-cap::placeholder { color: #555; }

/* 크게 보기 */
.viewer { position: fixed; inset: 0; z-index: 55; background: rgba(18,18,18,.94); color: #f1f1f1; display: grid; grid-template-rows: auto 1fr auto; font-size: 13px; font-weight: 500; }
.viewer button { color: inherit; font-size: 14px; }
.viewer button:hover, .viewer button:active { text-decoration: underline; text-underline-offset: 3px; }
.viewer-top, .viewer-bottom { display: flex; align-items: baseline; gap: 16px; padding: 14px 20px; }
.viewer-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #9a9a9a; }
.viewer-bottom .g { color: #8a8a8a; }
.viewer-actions { margin-left: auto; display: flex; gap: 18px; }
.viewer-stage { position: relative; display: grid; place-items: center; min-height: 0; padding: 0 64px; }
.viewer-stage img, .viewer-stage video { max-width: 100%; max-height: calc(100vh - 110px); object-fit: contain; display: block; }
.viewer-stage iframe { width: min(900px, 100%); height: calc(100vh - 110px); border: 0; background: #fff; }
.viewer-wait { color: #8a8a8a; }
.viewer-nav { position: absolute; top: 50%; transform: translateY(-50%); font-size: 30px !important; padding: 16px; }
.viewer-nav.prev { left: 6px; } .viewer-nav.next { right: 6px; }
@media (max-width: 700px) { .viewer-stage { padding: 0 8px; } .viewer-nav { display: none; } }
