/* 2026-10-09 14:40 | y6y.io drop_zone v1.00 | layout and app components built on theme.css tokens */

html, body { min-height: 100%; }
body { overscroll-behavior-y: none; }
[hidden] { display: none !important; }

/* ---------- shell ---------- */
.dz-shell { max-width: 1240px; margin: 0 auto; padding: 28px 32px 64px; padding-top: max(28px, env(safe-area-inset-top)); }
.dz-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 32px; }
.dz-brand { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.dz-brand__name { font-size: var(--sh-fs-title); font-weight: 700; letter-spacing: -0.02em; text-shadow: var(--sh-emboss); }
.dz-brand__sub { font-size: var(--sh-fs-label); color: var(--sh-muted); text-shadow: var(--sh-emboss); }
.dz-header__controls { display: flex; align-items: center; gap: 16px; }
.dz-link-dot { display: inline-flex; align-items: center; gap: 8px; }
.dz-badge {
  position: absolute; top: -2px; right: -2px; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: var(--sh-r-pill); background: var(--sh-gloss), var(--sh-orange); color: #1D2025;
  font-size: 11px; font-weight: 700; line-height: 20px; text-align: center; box-shadow: var(--sh-sphere-shadow), var(--sh-glow);
}

/* ---------- main grid ---------- */
.dz-main { display: grid; grid-template-columns: 392px minmax(0, 1fr); gap: 36px; align-items: start; }
.dz-composer { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 18px; padding: 30px 26px; }
.dz-dial-wrap { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.dz-dial-caption { text-align: center; }
.dz-composer textarea.sh-field { min-height: 96px; max-height: 280px; resize: vertical; line-height: 1.5; }
.dz-options { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.dz-switch-label { display: flex; align-items: center; gap: 10px; }
.dz-custom-expiry { margin-top: -6px; }
.dz-actions-row { display: flex; gap: 12px; }
.dz-actions-row > .sh-btn--primary { flex: 1; min-height: 52px; font-size: 15px; }

/* ---------- storage gauge ---------- */
.dz-gauge { display: flex; flex-direction: column; gap: 8px; }
.dz-gauge__head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.dz-gauge .sh-progress { height: 16px; }
.dz-gauge__soft {
  position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; border-radius: 2px;
  background: var(--sh-ink); box-shadow: var(--sh-emboss);
}
.dz-gauge[data-level="ok"] { --sh-accent: var(--sh-navy); }
.dz-gauge[data-level="soft"] { --sh-accent: var(--sh-orange); }
.dz-gauge[data-level="full"] { --sh-accent: var(--sh-maroon); }

/* ---------- library ---------- */
.dz-library { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.dz-toolbar { display: flex; gap: 12px; align-items: center; }
.dz-search { position: relative; flex: 1; }
.dz-search .sh-field { padding-left: 46px; }
.dz-search__icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--sh-muted); display: flex; }
.dz-filters { overflow-x: auto; scrollbar-width: none; }
.dz-filters::-webkit-scrollbar { display: none; }
.dz-filters > button { flex: 1 0 auto; }
.dz-list { min-height: 220px; }
.dz-empty { padding: 48px 20px; text-align: center; color: var(--sh-muted); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.dz-bulkbar { display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 20px; border-radius: var(--sh-r-row); }
.dz-bulkbar__count { flex: 1; }

/* ---------- item rows ---------- */
.dz-item { cursor: pointer; align-items: flex-start; position: relative; transition: box-shadow 120ms ease; }
.dz-item:focus-visible { outline: 2px solid var(--sh-accent); outline-offset: 2px; }
.dz-item > .sh-dot { margin-top: 17px; }
.dz-item__thumb {
  width: 48px; height: 48px; flex: none; border-radius: 12px; overflow: hidden;
  background: var(--sh-concave); box-shadow: var(--sh-inset-sm);
  display: flex; align-items: center; justify-content: center; color: var(--sh-muted);
}
.dz-item__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dz-item__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; padding-top: 2px; }
.dz-item__text {
  white-space: pre-wrap; overflow-wrap: anywhere; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; line-height: 1.45;
}
.dz-item__meta { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.dz-item__flag { color: var(--sh-orange); }
.dz-item__flag--failed { color: var(--sh-maroon); }
.dz-item__actions { display: flex; gap: 8px; flex: none; }
.dz-icon-btn { width: 44px; min-height: 44px; padding: 0; border-radius: 50%; }
.dz-item__check { width: 28px; height: 28px; flex: none; margin-top: 10px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; background: var(--sh-concave); box-shadow: var(--sh-inset-sm); }
.dz-item__check[aria-checked="true"] { background: var(--sh-gloss), var(--sh-orange); box-shadow: var(--sh-sphere-shadow), var(--sh-glow); }
.dz-item.is-selected { box-shadow: var(--sh-tile), 0 0 0 2px var(--sh-orange); }
.dz-item .sh-progress { margin-top: 4px; }
.dz-pinmark { color: var(--sh-muted); display: inline-flex; }

/* ---------- auth ---------- */
.dz-auth { min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.dz-auth__inner { width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 28px; }
.dz-auth .dz-brand { justify-content: center; }
.dz-auth .dz-brand__name { font-size: var(--sh-fs-display); font-weight: 500; letter-spacing: -0.04em; }
.dz-form { display: flex; flex-direction: column; gap: 16px; }
.dz-form h1 { margin: 0 0 4px; }
.dz-form p { margin: 0; }
.dz-field-label { display: flex; flex-direction: column; gap: 8px; }
.dz-form__links { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.dz-linkbtn { background: none; border: 0; padding: 4px 0; cursor: pointer; color: var(--sh-muted); font-size: var(--sh-fs-label); text-decoration: underline; text-underline-offset: 3px; }
.dz-linkbtn:hover { color: var(--sh-ink); }
.dz-error { color: var(--sh-maroon); font-size: var(--sh-fs-label); min-height: 0; }
.dz-error:empty { display: none; }
.dz-pin { font-size: 28px; letter-spacing: 0.6em; text-align: center; padding-left: calc(18px + 0.6em); font-variant-numeric: tabular-nums; }
.dz-qr { display: flex; justify-content: center; padding: 14px; border-radius: var(--sh-r-panel); background: #FFFFFF; box-shadow: var(--sh-inset-sm); }
.dz-qr img { width: 220px; height: 220px; image-rendering: pixelated; }
.dz-secret { word-break: break-all; font-size: var(--sh-fs-label); }
.dz-codes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; padding: 18px; font-variant-numeric: tabular-nums; }

/* ---------- sheets (modal panels) ---------- */
.dz-scrim {
  position: fixed; inset: 0; z-index: 50; background: var(--sh-scrim);
  display: flex; align-items: center; justify-content: center; padding: 24px;
  animation: dz-fade 140ms ease;
}
.dz-sheet {
  width: 100%; max-width: 640px; max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px); overflow: auto;
  display: flex; flex-direction: column; gap: 18px; padding: 26px 24px; overscroll-behavior: contain;
  animation: dz-rise 180ms ease;
}
.dz-sheet--wide { max-width: 920px; }
.dz-sheet__content { display: flex; flex-direction: column; gap: 18px; }
.dz-sheet__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dz-sheet__head .sh-title { font-size: 20px; }
.dz-detail-text { white-space: pre-wrap; overflow-wrap: anywhere; padding: 18px; line-height: 1.55; max-height: 46vh; overflow: auto; user-select: text; }
.dz-detail-text textarea { min-height: 200px; }
.dz-preview { display: flex; justify-content: center; padding: 12px; }
.dz-preview img { max-width: 100%; max-height: 52vh; border-radius: 14px; display: block; }
.dz-facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; }
.dz-facts dt { color: var(--sh-muted); font-size: var(--sh-fs-label); }
.dz-facts dd { margin: 0; overflow-wrap: anywhere; }
.dz-action-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.dz-inline-form { display: flex; gap: 10px; align-items: stretch; }
.dz-inline-form > .sh-field { flex: 1; min-width: 0; }

/* ---------- settings ---------- */
.dz-settings { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 24px; }
.dz-settings__nav { display: flex; flex-direction: column; gap: 6px; padding: 6px; align-self: start; }
.dz-settings__nav > button { justify-content: flex-start; }
.dz-settings__body { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.dz-section { display: flex; flex-direction: column; gap: 14px; }
.dz-section h3 { margin: 0; font-size: 15px; font-weight: 700; }
.dz-section p { margin: 0; }
.dz-setting { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.dz-setting__text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.dz-device { display: flex; align-items: center; gap: 12px; }
.dz-device__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }

/* ---------- admin ---------- */
.dz-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.dz-stat { padding: 16px 18px; border-radius: var(--sh-r-row); display: flex; flex-direction: column; gap: 6px; }
.dz-stat__value { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.dz-user { flex-direction: column; align-items: stretch; gap: 12px; }
.dz-user__head { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.dz-user__head > .dz-item__body { padding: 0; }
.dz-user__panel { display: flex; flex-direction: column; gap: 12px; padding-top: 4px; }
.dz-limits { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; align-items: end; }
.dz-errors { max-height: 240px; overflow: auto; font-size: var(--sh-fs-meta); }
.dz-errors div { padding: 4px 0; overflow-wrap: anywhere; }

/* ---------- notifications ---------- */
.dz-note { align-items: flex-start; }
.dz-note > .sh-dot { margin-top: 4px; }
.dz-note.is-unread { box-shadow: var(--sh-tile), inset 3px 0 0 var(--sh-orange); }

/* ---------- toasts ---------- */
.dz-toasts { position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 80; display: flex; flex-direction: column; gap: 10px; align-items: center; width: min(560px, calc(100vw - 32px)); pointer-events: none; }
.dz-toast { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-radius: var(--sh-r-pill); max-width: 100%; pointer-events: auto; animation: dz-rise 180ms ease; }

/* ---------- splash ---------- */
.dz-splash { min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center; }

@keyframes dz-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes dz-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- tablet ---------- */
@media (max-width: 1000px) {
  .dz-main { grid-template-columns: 340px minmax(0, 1fr); gap: 28px; }
  .dz-dial-wrap .sh-bezel { zoom: 0.86; }
}

/* ---------- phone (Fold7 cover screen and folded) ---------- */
@media (max-width: 760px) {
  .dz-shell { padding: 18px 16px 48px; padding-top: max(18px, env(safe-area-inset-top)); }
  .dz-header { margin-bottom: 22px; }
  .dz-header__controls { gap: 12px; }
  .dz-main { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .dz-composer { position: static; padding: 22px 18px; border-radius: 30px; }
  .dz-dial-wrap .sh-bezel { zoom: 0.52; }
  .dz-dial-wrap { gap: 6px; }
  .dz-item { gap: 10px; padding: 12px; }
  .dz-item__actions .dz-icon-btn:not(.dz-keep) { display: none; }
  .dz-scrim { padding: 0; align-items: flex-end; }
  .dz-sheet { max-width: none; max-height: 92vh; max-height: 92dvh; border-radius: 30px 30px 0 0; padding: 22px 18px calc(22px + env(safe-area-inset-bottom)); }
  .dz-settings { grid-template-columns: minmax(0, 1fr); }
  .dz-settings__nav { flex-direction: row; overflow-x: auto; scrollbar-width: none; }
  .dz-settings__nav > button { flex: none; }
  .dz-limits { grid-template-columns: 1fr 1fr; }
  .dz-limits > .sh-btn { grid-column: 1 / -1; }
  .dz-action-grid { grid-template-columns: 1fr 1fr; }
  .dz-auth .dz-brand__name { font-size: 34px; }
  .sh-card.dz-auth-card { padding: 26px 20px; border-radius: 30px; }
}
