:root {
  --paper: #f7f5ef;
  --ink: #28291e;
  --olive: #65664e;
  --soft: #aaa99a;
  --line: #dddacf;
  --card: #fffefa;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Noto Sans KR", sans-serif;
}
button,
input,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
.app-shell {
  width: min(100% - 40px, 760px);
  margin: auto;
  padding: 35px 0 115px;
}
.topbar {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 72px;
}
.brand {
  font:
    500 30px/1 "Noto Serif KR",
    serif;
  color: var(--olive);
  text-decoration: none;
  letter-spacing: -0.1em;
}
.topbar nav {
  display: flex;
  gap: 24px;
}
.topbar nav button {
  border: 0;
  background: none;
  color: #77766b;
  font-size: 13px;
}
.topbar nav button.active {
  color: var(--ink);
  font-weight: 600;
}
.view {
  display: none;
}
.view.active {
  display: block;
}
.eyebrow {
  margin: 0 0 12px;
  color: var(--olive);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.15em;
}
.view h1 {
  margin: 0;
  font:
    500 clamp(38px, 6vw, 57px)/1.25 "Noto Serif KR",
    serif;
  letter-spacing: -0.06em;
}
.lead {
  margin: 18px 0 39px;
  color: #6e6d63;
  line-height: 1.8;
}
.composer {
  background: rgba(255, 255, 255, 0.38);
  padding: 27px 30px 30px;
  border: 1px solid rgba(221, 218, 207, 0.65);
  box-shadow: 0 18px 55px rgba(76, 70, 49, 0.045);
}
textarea {
  width: 100%;
  height: 190px;
  resize: vertical;
  border: 0;
  border-bottom: 1px solid var(--line);
  outline: 0;
  background: transparent;
  color: var(--ink);
  font:
    400 25px/1.65 "Noto Serif KR",
    serif;
  letter-spacing: -0.04em;
}
textarea::placeholder {
  color: #c4c1b7;
}
.composer-count {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 13px 0 30px;
  font-size: 12px;
  color: #9b998f;
}
.photo-add {
  color: var(--olive);
  cursor: pointer;
}
.photo-add span,
.time-field legend span,
.place-field span {
  color: #aaa89e;
  font-weight: 400;
}
.photo-add:hover {
  text-decoration: underline;
}
#photo-preview {
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  margin: 0 0 28px;
}
.time-field {
  border: 0;
  padding: 0;
  margin: 0 0 25px;
}
.time-field legend,
.place-field {
  display: block;
  margin-bottom: 13px;
  color: #65645b;
  font-size: 13px;
}
.time-options {
  display: flex;
  gap: 10px;
}
.time-options button {
  width: 70px;
  padding: 13px 5px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: transparent;
  color: #89877d;
}
.time-options button span {
  display: block;
  margin-top: 5px;
  font-size: 11px;
}
.time-options button.selected {
  border-color: var(--olive);
  background: #edede5;
  color: var(--olive);
}
.place-field input {
  display: block;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  outline: 0;
  background: transparent;
  padding: 11px 0;
  color: var(--ink);
}
.place-field {
  margin-bottom: 34px;
}
.primary {
  width: 100%;
  border: 0;
  border-radius: 14px;
  background: #5c5d43;
  color: #fffdf7;
  padding: 17px;
  font-weight: 600;
  box-shadow: 0 7px 16px rgba(63, 64, 43, 0.16);
  transition:
    background 0.18s,
    box-shadow 0.18s,
    transform 0.18s;
}
.primary:hover,
.primary:focus-visible {
  background: #3f402c;
  color: #fff;
  box-shadow: 0 10px 22px rgba(63, 64, 43, 0.28);
  transform: translateY(-1px);
  outline: 0;
}
.primary:active {
  background: #303120;
  transform: translateY(0);
}
.privacy-note {
  text-align: center;
  color: #aaa79e;
  font-size: 12px;
  line-height: 1.8;
  margin: 22px 0;
}
.trace-list {
  display: grid;
  gap: 14px;
}
.trace-card {
  width: 100%;
  padding: 24px 25px;
  border: 1px solid rgba(221, 218, 207, 0.8);
  background: rgba(255, 255, 255, 0.42);
  text-align: left;
  color: var(--ink);
  box-shadow: 0 8px 30px rgba(76, 70, 49, 0.025);
}
.trace-card:hover {
  border-color: #c8c5b9;
}
.trace-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #949187;
  font-size: 12px;
}
.trace-card h2 {
  margin: 16px 0 0;
  font:
    400 24px/1.6 "Noto Serif KR",
    serif;
  letter-spacing: -0.04em;
}
.trace-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  margin: 17px 0 0;
}
.trace-card.hidden-preview h2 {
  filter: blur(7px);
  user-select: none;
}
.empty {
  padding: 60px 20px;
  text-align: center;
  border: 1px dashed var(--line);
  color: #8a887e;
  line-height: 1.8;
}
.month-picker {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin: -12px 0 28px;
}
.month-picker button {
  border: 0;
  background: none;
  color: var(--olive);
  font-size: 19px;
}
.month-picker strong {
  font:
    400 20px "Noto Serif KR",
    serif;
}
.settings-list {
  display: grid;
  gap: 11px;
}
.settings-list button,
.settings-list label {
  padding: 17px 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.35);
  color: #4f5042;
  text-align: left;
  cursor: pointer;
}
.settings-list button:hover,
.settings-list label:hover {
  border-color: var(--olive);
}
dialog {
  width: min(100% - 40px, 620px);
  max-height: 85vh;
  border: 0;
  background: var(--card);
  color: var(--ink);
  padding: 0;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.25);
}
dialog::backdrop {
  background: rgba(33, 32, 26, 0.45);
}
#detail-content {
  padding: 48px 40px;
}
.close {
  position: absolute;
  right: 15px;
  top: 12px;
  border: 0;
  background: transparent;
  color: #777;
  font-size: 27px;
}
.detail-meta {
  color: #89877d;
  font-size: 13px;
}
.detail-scene {
  white-space: pre-wrap;
  font:
    400 29px/1.7 "Noto Serif KR",
    serif;
  letter-spacing: -0.05em;
}
.detail-image {
  width: 100%;
  max-height: 310px;
  object-fit: cover;
  margin: 20px 0;
}
.detail-actions {
  display: flex;
  gap: 10px;
  margin-top: 35px;
}
.detail-actions button {
  border: 1px solid var(--line);
  background: transparent;
  color: #5b5a50;
  padding: 10px 13px;
}
.detail-actions .danger {
  color: #9d625b;
}
#toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translate(-50%, 20px);
  opacity: 0;
  background: #323329;
  color: white;
  padding: 11px 16px;
  border-radius: 999px;
  font-size: 13px;
  transition: 0.2s;
  pointer-events: none;
}
#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.bottom-nav {
  display: none;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
@media (max-width: 640px) {
  .app-shell {
    width: 100%;
    padding: 24px 32px 116px;
  }
  .topbar {
    justify-content: center;
    margin-bottom: 77px;
  }
  .topbar nav {
    display: none;
  }
  .brand {
    font-size: 31px;
  }
  .view h1 {
    font-size: 43px;
  }
  .lead {
    font-size: 15px;
    margin-bottom: 37px;
  }
  .composer {
    margin: 0 -8px;
    padding: 23px 19px 24px;
  }
  .time-options {
    justify-content: space-between;
  }
  .time-options button {
    width: 22%;
  }
  textarea {
    height: 170px;
    font-size: 23px;
  }
  .bottom-nav {
    position: fixed;
    z-index: 2;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: space-around;
    padding: 15px 10px max(15px, env(safe-area-inset-bottom));
    background: rgba(255, 254, 250, 0.96);
    border-top: 1px solid #e7e3d9;
  }
  .bottom-nav button {
    display: grid;
    gap: 5px;
    border: 0;
    background: transparent;
    color: #a09e94;
    font-size: 21px;
  }
  .bottom-nav button span {
    font-size: 11px;
  }
  .bottom-nav button.active {
    color: var(--olive);
  }
  .trace-card {
    padding: 24px 21px;
  }
  .trace-card h2 {
    font-size: 23px;
  }
  .month-picker {
    margin-top: -12px;
  }
  #detail-content {
    padding: 48px 25px;
  }
  .detail-scene {
    font-size: 25px;
  }
  .settings-list button,
  .settings-list label {
    padding: 16px;
  }
  .privacy-note {
    font-size: 11px;
  }
}
