/* =========================================================
   Penyimpananku — gaya sketsa / buku catatan
   ========================================================= */

:root {
  --ink: #161616;
  --ink-soft: #4f4c45;
  --bg: #f8f6f0;
  --dot: #d6d1c4;
  --paper: #ffffff;
  --accent: #ea5b5b;
  --danger: #a42d2d;
  --tape: rgba(210, 205, 192, 0.88);
  --hl: #ffe58a;

  --peach: #ffd9b0;
  --mint: #c3e8d3;
  --sky: #cbdcff;
  --pink: #ffcfd8;
  --butter: #fff0a6;

  --font-body: 'Patrick Hand', 'Comic Sans MS', 'Chalkboard SE', cursive;
  --font-display: 'Gochi Hand', 'Patrick Hand', 'Comic Sans MS', cursive;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;

  /* garis "digambar tangan" */
  --wob-card: 255px 15px 225px 15px / 15px 225px 15px 255px;
  --wob-card-b: 225px 18px 255px 15px / 15px 255px 15px 225px;
  --wob-ctl: 255px 12px 225px 12px / 12px 225px 12px 255px;
  --wob-box: 14px 6px 12px 8px / 8px 12px 6px 14px;
  --wob-blob: 50% 46% 52% 48% / 48% 52% 46% 54%;

  --nav-h: 78px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg);
  background-image: radial-gradient(var(--dot) 1.2px, transparent 1.2px);
  background-size: 18px 18px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.3;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

button {
  touch-action: manipulation;
}

h1,
h2,
h3,
p {
  margin: 0;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

:focus-visible {
  outline: 3px dashed var(--ink);
  outline-offset: 3px;
}

.app {
  max-width: 1080px;
  margin: 0 auto;
  padding: 18px 16px calc(var(--nav-h) + 28px + env(safe-area-inset-bottom));
}

/* ---------- header ---------- */

.header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 20px;
}

.title-wrap {
  min-width: 0;
  padding-bottom: 6px;
}

.header h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(25px, 7vw, 40px);
  line-height: 1;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.summary {
  margin-top: 8px;
  color: var(--ink-soft);
  font-size: 18px;
}

.doodle-cat {
  flex: none;
  width: 86px;
  height: 76px;
}

/* ---------- kartu & selotip ---------- */

.sketch-card {
  position: relative;
  background: var(--paper);
  border: 2.5px solid var(--ink);
  border-radius: var(--wob-card);
  padding: 18px 16px 16px;
  margin-bottom: 20px;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.15);
}

.tape {
  position: absolute;
  top: -11px;
  left: 50%;
  width: 74px;
  height: 20px;
  transform: translateX(-50%) rotate(1deg);
  background: var(--tape);
  border: 1px dashed rgba(0, 0, 0, 0.25);
  pointer-events: none;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 26px;
  line-height: 1.1;
}

.count {
  font-family: var(--font-body);
  font-size: 18px;
  color: var(--ink-soft);
  margin-left: 4px;
}

/* ---------- tombol ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 6px 18px;
  border: 2px solid var(--ink);
  border-radius: var(--wob-ctl);
  background: var(--paper);
  color: var(--ink);
  font-size: 19px;
  line-height: 1.1;
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--ink);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 0 0 0 var(--ink);
}

.btn:disabled {
  opacity: 0.55;
  cursor: progress;
}

.btn-primary {
  background: var(--accent);
}

.btn-danger {
  background: var(--accent);
}

.btn-small {
  min-height: 40px;
  padding: 4px 14px;
  font-size: 18px;
}

.btn-icon {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 2px solid var(--ink);
  border-radius: var(--wob-blob);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--ink);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.btn-icon:active {
  transform: translate(2px, 2px);
  box-shadow: 0 0 0 var(--ink);
}

.btn-text {
  min-height: 36px;
  padding: 4px 10px;
  border: 0;
  background: none;
  color: var(--ink);
  font-size: 18px;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  cursor: pointer;
}

.btn-text.is-danger {
  color: var(--danger);
}

.icon {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

/* ---------- input ---------- */

.sketch-input,
.sketch-select {
  width: 100%;
  min-height: 44px;
  padding: 6px 14px;
  border: 2px solid var(--ink);
  border-radius: var(--wob-ctl);
  background: #fafafa;
  outline: none;
  font-size: 18px;
}

.sketch-input:focus-visible,
.sketch-select:focus-visible {
  outline: 3px dashed var(--ink);
  outline-offset: 3px;
}

.sketch-input::placeholder {
  color: #77746c;
}

textarea.sketch-input {
  resize: vertical;
  min-height: 84px;
  border-radius: var(--wob-box);
  padding-top: 10px;
}

.sketch-select {
  width: auto;
  min-width: 128px;
  padding-right: 34px;
  cursor: pointer;
  appearance: none;
  background-image: url('data:image/svg+xml;utf8,<svg fill="%23161616" height="20" viewBox="0 0 24 24" width="20" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 8px center;
}

/* ---------- kartu kontrol ---------- */

.controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.crumbs-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
  padding: 4px 2px;
}

.breadcrumb::-webkit-scrollbar {
  display: none;
}

.crumb {
  flex: none;
  min-height: 36px;
  padding: 2px 8px;
  border: 0;
  background: none;
  color: var(--ink-soft);
  font-size: 20px;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
  cursor: pointer;
}

.crumb[aria-current='page'] {
  min-height: 0;
  padding: 0 6px;
  line-height: 1.15;
  color: var(--ink);
  text-decoration: none;
  cursor: default;
  background: linear-gradient(transparent 55%, var(--hl) 55%);
}

.crumb-sep {
  flex: none;
  color: var(--ink-soft);
}

.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 3px 6px;
  margin: 0 -3px;
  scrollbar-width: none;
}

.chips::-webkit-scrollbar {
  display: none;
}

.chip {
  flex: none;
  min-height: 38px;
  padding: 3px 16px;
  border: 2px solid var(--ink);
  border-radius: var(--wob-ctl);
  background: var(--paper);
  font-size: 18px;
  cursor: pointer;
}

.chip[aria-pressed='true'] {
  background: var(--hl);
  box-shadow: 2px 2px 0 var(--ink);
}

.view-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sort-label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-soft);
}

.seg {
  display: flex;
  gap: 8px;
}

.seg-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 2px solid var(--ink);
  border-radius: var(--wob-box);
  background: var(--paper);
  cursor: pointer;
}

.seg-btn[aria-pressed='true'] {
  background: var(--hl);
  box-shadow: 2px 2px 0 var(--ink);
}

/* ---------- folder ---------- */

.folders-section {
  margin-bottom: 26px;
}

.folder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 26px 16px;
  padding-top: 14px;
}

.folder-grid:empty {
  display: none;
}

.folder {
  position: relative;
  background: var(--fc, var(--peach));
  border: 2.5px solid var(--ink);
  border-radius: 6px 12px 8px 14px / 10px 6px 12px 8px;
  box-shadow: 3px 3px 0 var(--ink);
}

/* telinga folder */
.folder::before {
  content: '';
  position: absolute;
  left: 14px;
  bottom: calc(100% - 3px);
  width: 58px;
  height: 15px;
  background: var(--fc, var(--peach));
  border: 2.5px solid var(--ink);
  border-bottom: 0;
  border-radius: 9px 12px 0 0;
  pointer-events: none;
}

.folder-open {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 92px;
  padding: 12px 54px 10px 14px;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
}

.folder:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--ink);
}

.folder-name {
  font-size: 21px;
  line-height: 1.12;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.folder-date {
  font-size: 16px;
  color: var(--ink-soft);
}

/* tombol titik tiga */
.more {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 2px solid var(--ink);
  border-radius: var(--wob-blob);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
}

.more:active {
  background: var(--hl);
}

/* ---------- file ---------- */

.file-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 24px 14px;
}

.file-card {
  position: relative;
}

.file-open {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
}

.thumb {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 2.5px solid var(--ink);
  border-radius: var(--wob-box);
  background: var(--mint);
}

.thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.has-photo .thumb {
  background-color: #ece8dc;
  background-image: radial-gradient(#cfc9b9 1.2px, transparent 1.2px);
  background-size: 12px 12px;
}

.kind-doc .thumb {
  background: var(--butter);
}

.kind-archive .thumb {
  background: var(--sky);
}

.glyph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.glyph svg {
  width: 52%;
  height: auto;
  overflow: visible;
}

.glyph-page {
  fill: var(--paper);
  stroke: var(--ink);
  stroke-width: 2.4;
  stroke-linejoin: round;
}

.glyph-fold,
.glyph-lines,
.glyph-zip {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.glyph-zip {
  display: none;
}

.kind-archive .glyph-zip {
  display: block;
}

.kind-archive .glyph-lines {
  display: none;
}

.glyph-ext {
  fill: var(--ink);
  font-family: var(--font-body);
  font-size: 14px;
}

.file-name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
  font-size: 18px;
  line-height: 1.15;
}

.file-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0 10px;
  color: var(--ink-soft);
  font-size: 16px;
}

.file-card .more {
  top: 8px;
  right: 8px;
}

/* tampilan kotak: foto dengan selotip & miring sedikit */
.view-grid .file-card:nth-child(3n + 1) {
  transform: rotate(-0.7deg);
}

.view-grid .file-card:nth-child(3n + 2) {
  transform: rotate(0.6deg);
}

.view-grid .file-card.has-photo::before {
  content: '';
  position: absolute;
  top: -9px;
  left: 50%;
  z-index: 3;
  width: 52px;
  height: 17px;
  margin-left: -26px;
  transform: rotate(-3deg);
  background: var(--tape);
  border: 1px dashed rgba(0, 0, 0, 0.25);
  pointer-events: none;
}

.view-grid .file-card.has-photo:nth-child(even)::before {
  transform: rotate(2.5deg);
}

.view-grid .file-open:active .thumb {
  transform: translate(2px, 2px);
}

/* tampilan daftar */
.file-grid.view-list {
  grid-template-columns: 1fr;
  gap: 10px;
}

.view-list .file-card {
  padding: 8px 58px 8px 8px;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: var(--wob-ctl);
}

.view-list .file-open {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  grid-template-areas:
    'thumb name'
    'thumb meta';
  column-gap: 12px;
  row-gap: 2px;
  align-items: center;
}

.view-list .thumb {
  grid-area: thumb;
  width: 58px;
  border-width: 2px;
}

.view-list .file-name {
  grid-area: name;
  align-self: end;
}

.view-list .glyph svg {
  width: 62%;
}

.view-list .glyph-ext {
  display: none;
}

.view-list .file-meta {
  grid-area: meta;
  justify-content: flex-start;
  gap: 0 14px;
  align-self: start;
}

.view-list .file-card .more {
  top: 50%;
  right: 8px;
  margin-top: -20px;
}

.empty-state {
  padding: 26px 8px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 19px;
}

/* ---------- catatan ---------- */

.notes-card {
  margin-bottom: 26px;
}

#note-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

#note-form .btn {
  align-self: flex-start;
}

.notes-list {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.note {
  position: relative;
  padding: 18px 14px 6px;
  background: var(--nc, var(--butter));
  border: 2px solid var(--ink);
  border-radius: 6px 12px 8px 14px / 10px 6px 12px 8px;
  box-shadow: 3px 3px 0 var(--ink);
}

.note:nth-child(odd) {
  transform: rotate(-0.5deg);
}

.note:nth-child(even) {
  transform: rotate(0.5deg);
}

.note::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 22px;
  width: 54px;
  height: 18px;
  transform: rotate(-4deg);
  background: var(--tape);
  border: 1px dashed rgba(0, 0, 0, 0.25);
}

.note-text {
  user-select: text;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 19px;
  line-height: 1.3;
}

.note-text a {
  color: var(--ink);
  text-decoration: underline wavy var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.note-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 12px;
  margin-top: 10px;
  color: var(--ink-soft);
  font-size: 16px;
}

.note-meta .actions {
  display: flex;
  gap: 4px;
  margin-right: -8px;
}

/* ---------- navigasi bawah ---------- */

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  background: var(--bg);
  border-top: 2px solid var(--ink);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-height: 54px;
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--ink);
  font-size: 17px;
  cursor: pointer;
}

.nav-item svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-item span {
  padding: 0 4px;
}

.nav-item.is-active span {
  background: linear-gradient(transparent 52%, var(--hl) 52%);
}

.nav-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: 84px;
  font-size: 17px;
}

.nav-fab {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  margin-top: -32px;
  padding: 0;
  border: 2.5px solid var(--ink);
  border-radius: var(--wob-blob);
  background: var(--accent);
  color: var(--ink);
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.nav-fab:active {
  transform: translate(3px, 3px);
  box-shadow: 0 0 0 var(--ink);
}

.nav-fab svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.6;
  stroke-linecap: round;
}

/* ---------- modal / sheet ---------- */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(22, 22, 22, 0.55);
}

.modal {
  display: flex;
  flex-direction: column;
  width: min(560px, 100%);
  max-height: 90vh;
  max-height: 90dvh;
  background-color: var(--paper);
  background-image: radial-gradient(#e6e2d6 1.1px, transparent 1.1px);
  background-size: 16px 16px;
  border: 2.5px solid var(--ink);
  border-bottom: 0;
  border-radius: 24px 18px 0 0 / 16px 20px 0 0;
  padding-bottom: env(safe-area-inset-bottom);
  animation: sheet-up 0.18s ease-out;
  outline: none;
}

@keyframes sheet-up {
  from {
    transform: translateY(24px);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px 10px 18px;
  border-bottom: 2px dashed var(--ink);
}

.modal-header h3 {
  min-width: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 23px;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.modal-body {
  padding: 16px 18px 20px;
  overflow: auto;
}

.modal-body .sketch-input {
  margin-bottom: 4px;
}

.modal-body textarea.editor {
  display: block;
  width: 100%;
  min-height: 42vh;
  padding: 12px;
  border: 2px solid var(--ink);
  border-radius: var(--wob-box);
  background: #fafafa;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.5;
  resize: vertical;
  tab-size: 2;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.hint {
  margin-bottom: 12px;
  color: var(--ink-soft);
}

.modal-body p.confirm {
  font-size: 20px;
  overflow-wrap: anywhere;
}

/* menu aksi */
.sheet-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sheet-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 52px;
  padding: 8px 16px;
  border: 2px solid var(--ink);
  border-radius: var(--wob-ctl);
  background: var(--paper);
  font-size: 20px;
  text-align: left;
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--ink);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.sheet-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 0 0 0 var(--ink);
}

.sheet-btn.is-danger {
  color: var(--danger);
}

/* isi zip */
.zip-list {
  border: 2px solid var(--ink);
  border-radius: var(--wob-box);
  background: var(--paper);
  max-height: 44vh;
  overflow: auto;
}

.zip-entry {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 7px 12px;
  border-bottom: 1.5px dashed #b8b3a4;
  font-family: var(--font-mono);
  font-size: 13px;
}

.zip-entry:last-child {
  border-bottom: 0;
}

.zip-entry span:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.zip-entry span:last-child {
  flex: none;
  color: var(--ink-soft);
}

/* penampil foto */
.overlay[data-variant='viewer'] {
  background: rgba(14, 14, 14, 0.985);
}

.overlay[data-variant='viewer'] .modal {
  width: min(1000px, 100%);
  height: 100vh;
  height: 100dvh;
  max-height: none;
  background: transparent;
  border: 0;
  border-radius: 0;
  color: #fff;
  animation: none;
}

.overlay[data-variant='viewer'] .modal-header {
  border-bottom: 0;
}

.overlay[data-variant='viewer'] :focus-visible {
  outline-color: #fff;
}

.overlay[data-variant='viewer'] .modal-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  padding: 0 14px 16px;
  overflow: hidden;
}

.viewer {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
}

.viewer-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  touch-action: pan-y;
}

.viewer-stage img {
  position: absolute;
  inset: 0;
  max-width: 100%;
  max-height: 100%;
  margin: auto;
  background: #fff;
  border: 7px solid #fff;
  border-radius: 3px;
  box-shadow: 4px 5px 0 rgba(0, 0, 0, 0.45);
}

.viewer-error {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
  font-size: 20px;
}

.viewer-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  margin-top: -21px;
}

.viewer-nav.prev {
  left: 4px;
}

.viewer-nav.next {
  right: 4px;
}

.viewer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.viewer-caption {
  display: flex;
  gap: 16px;
  color: #e9e6dc;
  font-size: 18px;
}

/* ---------- toast & drop ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--nav-h) + 26px + env(safe-area-inset-bottom));
  z-index: 80;
  max-width: min(92vw, 440px);
  padding: 8px 18px;
  transform: translateX(-50%);
  border: 2px solid var(--ink);
  border-radius: var(--wob-ctl);
  background: var(--ink);
  color: #fff;
  font-size: 18px;
  text-align: center;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.25);
}

.toast.is-error {
  background: var(--accent);
  color: var(--ink);
}

.dropzone {
  position: fixed;
  inset: 12px;
  z-index: 90;
  display: grid;
  place-items: center;
  border: 4px dashed var(--ink);
  border-radius: var(--wob-card);
  background: rgba(248, 246, 240, 0.94);
  font-family: var(--font-display);
  font-size: 30px;
  text-align: center;
  pointer-events: none;
}

/* ---------- HP: tab File / Catatan ---------- */

@media (max-width: 899px) {
  body[data-tab='files'] .notes-pane {
    display: none;
  }

  body[data-tab='notes'] .files-pane {
    display: none;
  }

  .btn-upload-desktop {
    display: none;
  }
}

/* ---------- layar lebar ---------- */

@media (min-width: 700px) {
  .overlay {
    align-items: center;
    padding: 24px;
  }

  .modal {
    max-height: 86vh;
    border-bottom: 2.5px solid var(--ink);
    border-radius: var(--wob-card);
    box-shadow: 5px 5px 0 var(--ink);
  }

  .overlay[data-variant='viewer'] {
    padding: 0;
  }
}

@media (min-width: 900px) {
  .app {
    padding: 28px 28px 48px;
  }

  .header {
    margin-bottom: 26px;
  }

  .doodle-cat {
    width: 104px;
    height: 92px;
  }

  .columns {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 32px;
    align-items: start;
  }

  .notes-pane {
    position: sticky;
    top: 20px;
  }

  .bottom-nav {
    display: none;
  }

  .toast {
    bottom: 28px;
  }

  .file-grid {
    grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  }

  .controls {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }

  .crumbs-row {
    flex: 1 1 100%;
  }

  .controls .sketch-input {
    flex: 1 1 240px;
    width: auto;
  }

  .chips {
    flex: 0 1 auto;
    padding-bottom: 2px;
  }

  .view-row {
    flex: 1 1 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
