:root {
  color-scheme: light;
  --paper: #fcfbf7;
  --panel: #f4f3eb;
  --ink: #202922;
  --muted: #5d685f;
  --line: #d9dfd2;
  --green: #1e543d;
  --mint: #dcf0ca;
  --warn: #855825;
  --serif: "AppleMyungjo", "Noto Serif KR", "Nanum Myeongjo", Georgia, serif;
  font:
    16px/1.55 "Apple SD Gothic Neo",
    "Malgun Gothic",
    system-ui,
    sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
  background: none;
  border: 0;
  border-radius: 8px;
}
button:hover {
  background: #e8eddf;
}
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[contenteditable]:focus-visible {
  outline: 3px solid #498357;
  outline-offset: 3px;
}
svg.ico {
  width: 21px;
  height: 21px;
  flex-shrink: 0;
  stroke: currentColor;
  stroke-width: 1.7;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.brand {
  font:
    bold 30px/1 Georgia,
    serif;
  letter-spacing: -1.5px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.brand svg {
  width: 28px;
  height: 30px;
}
.mast {
  height: 74px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
}
.mast .left,
.row,
.actions,
.tag,
.pair {
  display: flex;
  align-items: center;
  gap: 10px;
}
.small,
.meta {
  font-size: 13px;
  color: var(--muted);
}
.mast .sep {
  margin-left: 10px;
  padding-left: 18px;
  border-left: 1px solid var(--line);
}
.pill {
  font-size: 12px;
  color: var(--green);
  padding: 4px 9px;
  border-radius: 12px;
  background: #e6edde;
}
.btn,
.primary,
.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 8px 13px;
}
.btn {
  border: 1px solid var(--line);
  background: var(--paper);
}
.icon {
  width: 44px;
  padding: 0;
}
.primary {
  background: var(--green);
  color: white;
}
.primary:hover {
  background: #143e2d;
}
.workspace {
  display: grid;
  grid-template-columns: minmax(210px, 0.85fr) minmax(370px, 2.05fr) minmax(
      245px,
      0.98fr
    );
  min-height: calc(100dvh - 74px);
}
.rail,
.inspector,
.article {
  padding: 30px 24px;
}
.rail {
  background: var(--panel);
  border-right: 1px solid var(--line);
}
.inspector {
  border-left: 1px solid var(--line);
  background: #f7f8f1;
}
.rail h2,
.inspector h2,
.section-title {
  font-size: 20px;
  margin: 0;
  letter-spacing: -0.7px;
}
.row.between {
  justify-content: space-between;
}
.rule {
  height: 1px;
  background: var(--line);
  margin: 20px 0;
}
.story {
  display: block;
  width: 100%;
  text-align: left;
  padding: 15px 12px;
  border-top: 1px solid var(--line);
  border-radius: 0;
}
.story.active {
  border-left: 3px solid var(--green);
  background: #e4ecd9;
}
.story b {
  display: block;
  margin: 6px 0;
  font-size: 16px;
  line-height: 1.45;
}
.story small,
.eyeline {
  font-size: 12px;
  color: var(--muted);
}
.article {
  padding: 36px clamp(24px, 3.8vw, 70px);
  min-width: 0;
}
.article h1,
.art-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(30px, 3.1vw, 47px);
  line-height: 1.28;
  letter-spacing: -1.7px;
  word-break: keep-all;
  margin: 32px 0 16px;
}
.article .text {
  font: 19px/1.95 var(--serif);
  word-break: keep-all;
  white-space: pre-wrap;
  min-height: 150px;
}
.article .actions {
  margin-top: 26px;
  flex-wrap: wrap;
}
.article [contenteditable] {
  border-radius: 3px;
}
.kicker {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--green);
}
.notes {
  margin-top: 18px;
}
.note {
  width: 100%;
  text-align: left;
  display: block;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 15px 16px;
  margin-bottom: 12px;
}
.note b {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--green);
  font-size: 14px;
}
.note p {
  margin: 8px 0 4px;
  line-height: 1.5;
}
.note small {
  color: var(--muted);
}
.note.warn b {
  color: var(--warn);
}
.source {
  font:
    13px/1.5 system-ui,
    sans-serif;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  padding-top: 16px;
  border-top: 1px solid var(--line);
  margin-top: 25px;
}
.mobile-frame {
  width: min(100%, 520px);
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
}
body[data-view="mobile"] {
  background: #e6e9e1;
}
.mobile-frame header,
.mobile-frame footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 15px 20px;
  border-bottom: 1px solid var(--line);
}
.mobile-frame header .brand {
  font-size: 27px;
}
.mobile-frame header .brand svg {
  width: 23px;
}
.mobile-main {
  padding: 22px 22px 26px;
  flex: 1;
}
.mobile-main h1 {
  font: 700 35px/1.3 var(--serif);
  letter-spacing: -1.6px;
  margin: 14px 0 20px;
}
.homehero {
  padding: 22px 0 14px;
}
.homehero .mark {
  height: 50px;
  width: 50px;
}
.choice {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  padding: 20px 16px;
  border: 1px solid var(--line);
  background: white;
  margin: 9px 0;
  border-radius: 14px;
}
.choice:first-of-type {
  background: #e5eedc;
}
.choice .tileicon {
  width: 39px;
  height: 39px;
  border-radius: 12px;
  background: #f5f8ed;
  color: var(--green);
  display: grid;
  place-items: center;
}
.choice b {
  flex: 1;
}
.mobile-frame footer {
  position: sticky;
  bottom: 0;
  align-items: flex-end;
  border-top: 1px solid var(--line);
  border-bottom: 0;
  background: var(--paper);
  padding-bottom: max(16px, env(safe-area-inset-bottom));
}
.composer {
  display: flex;
  align-items: center;
  gap: 3px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 3px;
  flex: 1;
  min-width: 0;
}
.composer input {
  padding: 7px 0;
  border: 0;
  min-width: 0;
  width: 100%;
  font-size: 15px;
  background: none;
}
.composer button,
.roundcall {
  border-radius: 50%;
}
.roundcall {
  width: 50px;
  height: 50px;
}
.message {
  max-width: 90%;
  padding: 12px 15px;
  margin: 12px 0;
  background: #eef1e8;
  border-radius: 14px;
  overflow-wrap: anywhere;
}
.message.mine {
  margin-left: auto;
  background: var(--green);
  color: white;
}
.call {
  padding: 20px;
  text-align: center;
  background: #173d30;
  color: #fff;
  border-radius: 16px;
}
.wave {
  display: flex;
  gap: 4px;
  align-items: center;
  justify-content: center;
  height: 36px;
}
.wave i {
  width: 4px;
  border-radius: 4px;
  background: #c4e89a;
}
.call .btn {
  color: var(--ink);
}
.call .end {
  background: #af463e;
  color: white;
}
.desk {
  max-width: 1050px;
  margin: auto;
  padding: 42px 28px;
}
.desk h1 {
  font: 700 40px/1.2 var(--serif);
  letter-spacing: -1.4px;
}
.deskline {
  display: grid;
  grid-template-columns: 1fr 100px 100px;
  gap: 14px;
  align-items: center;
  width: 100%;
  text-align: left;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 19px 8px;
}
dialog {
  width: min(440px, calc(100% - 36px));
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
  padding: 24px;
  box-shadow: 0 20px 65px #23382b35;
}
dialog::backdrop {
  background: #17281d55;
}
dialog h2 {
  font-size: 21px;
  margin: 0;
}
dialog label {
  display: block;
  font-weight: 600;
  margin: 16px 0 0;
}
dialog input,
dialog select,
dialog textarea,
.field {
  width: 100%;
  padding: 11px;
  border: 1px solid var(--line);
  background: white;
  border-radius: 8px;
}
dialog textarea {
  min-height: 110px;
}
.wide {
  width: 100%;
}
.stack > * + * {
  margin-top: 10px;
}
.editbody {
  min-height: 200px;
}
.call-note {
  font-size: 13px;
}
.empty {
  padding: 22px 4px;
  color: var(--muted);
}
#notice:not(:empty) {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 92%;
  background: #1b3829;
  color: white;
  padding: 9px 20px;
  border-radius: 22px;
  z-index: 9;
}
.mobile-frame .actions {
  flex-wrap: wrap;
}
.mobile-frame .recent {
  margin-top: 28px;
}
.recent .story {
  padding-left: 0;
}
.mark {
  fill: var(--green);
}
@media (max-width: 980px) {
  .workspace {
    grid-template-columns: 180px minmax(300px, 1fr) 228px;
  }
  .article,
  .rail,
  .inspector {
    padding: 22px 16px;
  }
}
@media (max-width: 730px) {
  .workspace {
    display: flex;
    flex-direction: column;
  }
  .mast {
    height: 60px;
    padding: 0 16px;
  }
  .rail {
    border-right: 0;
  }
  .article {
    padding: 20px;
  }
  .inspector {
    border-top: 1px solid var(--line);
    border-left: 0;
  }
  .mast .sep {
    display: none;
  }
  .deskline {
    grid-template-columns: 1fr 84px;
  }
  .deskline .owner {
    display: none;
  }
  .desk {
    padding: 22px 16px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}
.access {
  max-width: 470px;
  margin: 8vh auto;
  padding: 24px;
}
.access h1 {
  font: 700 44px/1.28 var(--serif);
  letter-spacing: -1.8px;
}
.access p b {
  float: right;
}
.homehero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
.homehero::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: -23px;
  top: 23px;
  width: 46%;
  height: 105px;
  transform: skewY(-23deg);
  background: repeating-linear-gradient(
    90deg,
    transparent 0 8px,
    #d4dfca 8px 10px
  );
  mask-image: linear-gradient(130deg, transparent, #000);
}
.article .text:empty::before {
  content: "본문을 입력하세요";
  color: var(--muted);
}
.deskline:hover {
  background: #eaf0e4;
}
.mobile-frame section,
.mobile-frame article {
  min-width: 0;
}

.proof {
  border-collapse: collapse;
  width: 100%;
  font-variant-numeric: tabular-nums;
}
.proof td,
.proof th {
  padding: 8px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.proof caption {
  text-align: left;
  font-weight: 700;
}
.access .row,
.desk .row {
  flex-wrap: wrap;
}
summary {
  cursor: pointer;
}

details[data-edition] .text {
  white-space: pre-wrap;
}
details[data-edition],
.source,
.message {
  overflow-wrap: anywhere;
}
.actions {
  flex-wrap: wrap;
}
@media (max-width: 380px) {
  .mobile-frame header {
    flex-wrap: wrap;
    gap: 4px;
  }
  .mobile-frame header .btn {
    padding-inline: 6px;
  }
}

/* Voice state is rendered on the device. Eight bars share two transform animations. */
.desktop-voice { margin-top: 12px; }
.desktop-voice .call { max-width: 34rem; }
.call .wave { margin-bottom: 5px; }
.call .wave i { transform: scaleY(.24); }
.call[data-phase="listen"] .wave i,
.call[data-phase="speak"] .wave i {
  animation: castbot-voice .88s ease-in-out var(--beat) infinite alternate;
}
.call[data-phase="speak"] .wave i {
  animation-duration: .49s;
  background: #f8efcf;
}
.call[data-phase="think"] .wave i {
  display: none;
  animation: castbot-wait 1.1s ease-in-out var(--beat) infinite alternate;
}
.call[data-phase="think"] .wave i:nth-child(-n+3) {
  display: block; height: 5px !important; width: 5px; transform: none;
}
.call[data-phase="muted"] .wave i { height: 2px !important; transform: none; }
@keyframes castbot-voice { from { transform: scaleY(.3); } to { transform: scaleY(1); } }
@keyframes castbot-wait { from { opacity: .4; } to { opacity: 1; } }
.motion-paused .call .wave i { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .call[data-phase] .wave i { animation: none; }
  .call[data-phase="listen"] .wave i, .call[data-phase="speak"] .wave i { transform: scaleY(.72); }
}

.sign-in { min-height:100svh; display:grid; grid-template-rows:auto 1fr; background:var(--paper); }
.sign-in > header { padding:20px clamp(20px,5vw,60px); border-bottom:1px solid var(--line); }
.sign-in-card.access { width:min(100%,460px); margin:auto; padding:36px 24px 14vh; }
.sign-in-card h1 { font:700 clamp(30px,5vw,40px)/1.25 var(--serif); letter-spacing:-.04em; margin:0 0 14px; }
.sign-in-card p { margin:0; color:var(--muted); }
.sign-in-card .sign-in-note { font-size:13px; text-align:center; }
.auth-choices {display:flex; gap:4px; background:var(--panel); border:1px solid var(--line); border-radius:10px; padding:4px; margin:24px 0 18px}
.auth-choices button {flex:1; min-height:44px}
.auth-choices [aria-pressed=true] {background:var(--green);color:white;font-weight:700}
#email-form {display:grid;gap:16px;margin:20px 0}
#email-form label {display:grid;gap:6px;font-weight:600}
#email-form input {min-width:0;width:100%;border:1px solid var(--line);border-radius:7px;padding:11px;background:white}
#auth-error:empty {display:none}
#auth-error {color:#804419}
.referral-value {overflow-wrap:anywhere;user-select:all}
.auth-back {margin-bottom:12px}
.primary.google { display:flex; align-items:center; justify-content:center; gap:10px; width:100%; min-height:48px; }
.primary.google img { background:#fff; border-radius:50%; padding:3px; box-sizing:content-box; }
