:root {
  --paper: #f8f7f3;
  --ink: #202724;
  --muted: #616964;
  --line: #d8dbd3;
  --accent: #ad472c;
  --white: #fffefa;
  font-family: "Inter", "Malgun Gothic", "Apple SD Gothic Neo", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-size: 16px;
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
button, input, select, a { font: inherit; }
button, a.btn { cursor: pointer; }
button { color: inherit; }
button:disabled { opacity: .52; cursor: default; }
button, input, select, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #bd5a36; outline-offset: 4px; }
[hidden], .symbols { display: none !important; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { word-break: keep-all; overflow-wrap: anywhere; }
button, label, h1, h2, h3 { letter-spacing: -.035em; }
a { color: inherit; }
.shell { width: min(100%, 1600px); margin: auto; padding: 0 clamp(20px, 4vw, 72px) 32px; }
.masthead { height: 84px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--line); }
.wordmark { display: inline-flex; align-items: center; color: #202724; font: bold 2.2rem/.95 Georgia, "Times New Roman", serif; letter-spacing: -.083em; }
.brand-point { color: var(--accent); }
.brand-icon { width: 29px; height: 25px; display: block; position: relative; margin-right: 11px; }
.brand-icon i { width: 21px; height: 17px; border: 2px solid var(--ink); position: absolute; inset: 0 auto auto 0; transform: skewY(-6deg); }
.brand-icon i + i { left: 7px; top: 7px; background: var(--paper); border-color: var(--accent); }
.guest-badge { display: flex; align-items: center; gap: 7px; font-size: .875rem; font-weight: 600; }
.icon, .empty-icon { width: 19px; height: 19px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.guest-badge .icon { width: 15px; height: 15px; }
.auth-layout { margin-top: 24px; display: grid; grid-template-columns: minmax(0, 1.17fr) minmax(0, 1fr); min-height: min(720px, calc(100svh - 135px)); border: 1px solid var(--line); background: var(--white); }
.cover-figure { min-height: 570px; isolation: isolate; position: relative; overflow: hidden; background: #445859; }
.cover-image { position: absolute; inset: 0; height: 100%; width: 100%; object-fit: cover; object-position: center; z-index: -2; }
.cover-figure::after { content: ""; position: absolute; z-index: -1; inset: 50% 0 0; background: linear-gradient(transparent, #122224d4); }
.cover-caption { position: absolute; left: clamp(24px, 3.6vw, 58px); right: 24px; bottom: clamp(28px, 4vw, 58px); color: #fffaf1; display: grid; justify-items: start; gap: 12px; }
.cover-byline { display: flex; align-items: center; gap: 10px; font-size: .75rem; letter-spacing: .12em; font-weight: 600; }
.cover-byline i { display: inline-block; width: 26px; height: 2px; background: #f8b593; }
.cover-title { font-size: clamp(2.5rem, 4vw, 4rem); letter-spacing: -.08em; font-family: "Nanum Myeongjo", "Batang", Georgia, serif; line-height: 1.15; }
.cover-dimension { font: .875rem/1.5 "IBM Plex Mono", Consolas, "Malgun Gothic", monospace; color: #f7f1e8; }
.cover-dimension span { padding: 0 5px; opacity: .6; }
.auth-panel { display: grid; place-items: center; padding: clamp(26px, 4.8vw, 76px); }
.auth-content { width: min(100%, 390px); padding: 22px 0; }
h1 { font-size: clamp(2rem, 3.65vw, 3.65rem); line-height: 1.18; font-weight: 670; letter-spacing: -.085em; }
.auth-content h1 { font-size: clamp(2.15rem, 3.35vw, 3.4rem); }
.intro, .empty p { color: var(--muted); line-height: 1.75; word-break: keep-all; overflow-wrap: anywhere; }
.auth-content .intro { margin: 16px 0 35px; }
.field-stack { display: grid; gap: 20px; }
.field-stack label, .standalone-field { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; font-size: .94rem; font-weight: 650; }
input:not([type=file]), select { min-width: 0; border: 1px solid #cdd1c8; border-radius: 4px; padding: 13px 14px; background-color: var(--white); color: var(--ink); }
.field-stack label > input, .standalone-field input { width: 100%; font-weight: 400; }
input::placeholder { color: #6c736d; }
.btn, .text-btn, .icon-btn { appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 9px; font-weight: 650; border-radius: 4px; text-decoration: none; line-height: 1.4; }
.btn { padding: 12px 19px; border: 1px solid transparent; min-height: 46px; }
.btn.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.primary:hover:enabled, a.btn.primary:hover { background: #37473d; }
.btn.light { background: var(--white); border-color: #c7ccc3; }
.btn.light:hover:enabled, .btn.subtle:hover:enabled, .icon-btn:hover { background: #eeeee6; }
.btn.subtle { background: transparent; border-color: var(--line); }
.btn.small { min-height: 39px; padding: 8px 13px; font-size: .875rem; }
.submit { margin-top: 5px; width: 100%; }
.text-btn { padding: 8px 0; border: 0; background: transparent; color: var(--accent); font-size: .94rem; }
.text-btn:hover { text-decoration: underline; text-underline-offset: 4px; }
#auth-switch { margin-top: 18px; }
.error { padding: 10px 12px; border-left: 2px solid #a7452b; background: #faeee7; color: #843720; font-size: .94rem; line-height: 1.55; overflow-wrap: anywhere; }
#boot { min-height: 300px; display: grid; place-content: center; text-align: center; gap: 16px; }
.account-menu { display: flex; align-items: center; justify-content: flex-end; gap: 15px; min-width: 0; }
#account-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 190px; font-size: .875rem; font-weight: 550; }
.icon-btn { width: 42px; height: 42px; padding: 0; border: 1px solid transparent; background: transparent; flex-shrink: 0; }
.gallery-heading { display:flex; align-items: center; justify-content: space-between; gap: 20px; padding: clamp(35px, 5.3vw, 78px) 0 27px; }
.gallery-count { margin-top: 11px; font-size: .94rem; color: var(--muted); }
.browse-tools { display: grid; gap: 18px; }
.search-field { display: flex; align-items: center; gap: 10px; width: min(100%, 470px); }
.search-field .icon { position: absolute; margin-left: 13px; color: var(--muted); pointer-events: none; }
.search-field input { width: 100%; padding: 12px 15px 12px 41px; }
.filter-row { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 14px 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chip { background: transparent; border: 1px solid transparent; padding: 8px 12px; border-radius: 4px; font-size: .875rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.chip:hover { background: #f0eee7; }
.chip[aria-pressed=true] { color: #f8f7f3; background: #303b34; }
.select-shell { position: relative; flex-shrink: 0; }
.select-shell::after { position: absolute; top: calc(50% - 4px); right: 13px; content: ""; width: 6px; height: 6px; transform: rotate(45deg); border: solid var(--muted); border-width: 0 1.5px 1.5px 0; pointer-events: none; }
.select-shell select { appearance: none; padding: 8px 32px 8px 12px; font-size: .875rem; font-weight: 600; min-height: 37px; }
.groups { display: grid; gap: 36px; margin: 32px 0; }
.group { min-width: 0; }
.group-heading { display: flex; align-items: baseline; gap: 11px; margin-bottom: 16px; flex-wrap: wrap; }
.group-heading h2 { font-size: clamp(1.26rem, 2vw, 1.8rem); line-height: 1.15; letter-spacing: -.055em; font-family: Georgia, "Times New Roman", serif; }
.group-heading span { color: var(--muted); font-size: .82rem; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(265px, 100%), 1fr)); gap: 22px; }
.groups.compact { grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); gap: 24px; }
.groups.compact .card-grid { grid-template-columns: 1fr; }
.wall-card { display: grid; align-content: start; min-width: 0; border-bottom: 1px solid var(--line); }
.wall-preview { display: block; position: relative; width: 100%; padding: 0; border: none; border-radius: 4px; overflow: hidden; background: #e5e6dc; }
.wall-preview img { display: block; width: 100%; aspect-ratio: 1.68; object-fit: cover; transition: transform .22s ease; }
.wall-preview:hover img { transform: scale(1.025); }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0 13px; }
.card-caption { min-width: 0; }
.card-caption h3 { font-size: 1.1rem; margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 650; }
.card-caption p { font-size: .82rem; color: var(--muted); }
.download-small { width: 38px; height: 38px; color: var(--ink); border-color: var(--line); }
.empty { margin: 34px 0; border: 1px solid var(--line); border-radius: 5px; overflow: hidden; display: grid; grid-template-columns: 1fr minmax(240px, 36%); background: var(--white); }
.empty.filtered { grid-template-columns: 1fr; }
.empty-content { align-self: center; padding: clamp(22px, 4vw, 54px); }
.empty h2 { margin: 14px 0 9px; font-size: clamp(1.4rem, 2vw, 2rem); }
.empty-icon { width: 28px; height: 28px; color: var(--accent); }
.empty-art { width: 100%; height: 100%; max-height: 290px; object-fit: cover; }
.empty .btn { margin-top: 18px; }
.storage { padding: 18px 0; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .82rem; }
meter { width: 76px; height: 9px; }
meter::-webkit-meter-bar { background: #e4e6de; border: none; }
meter::-webkit-meter-optimum-value { background: #788674; }
dialog { border: 1px solid var(--line); border-radius: 7px; background: var(--white); color: var(--ink); padding: 0; max-height: calc(100dvh - 28px); max-width: calc(100vw - 28px); box-shadow: 0 24px 70px #13231d40; }
dialog::backdrop { background: #17211cd9; }
.form-modal { width: 470px; padding: clamp(19px, 3vw, 30px); }
.modal-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 19px; }
dialog h2 { font-size: 1.5rem; line-height: 1.35; letter-spacing: -.065em; }
.modal-header .icon-btn { margin: -7px -7px -7px 0; }
.modal-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.hint, .picker span { color: var(--muted); font-weight: 400; font-size: .875rem; line-height: 1.6; }
.picker { position: relative; align-items: center !important; flex-direction: column; justify-content: center; gap: 6px !important; padding: 21px 12px; border: 1px dashed #a9b3a7; background: #f3f4ed; border-radius: 4px; cursor: pointer; }
.picker:focus-within { outline: 3px solid var(--accent); outline-offset: 3px; }
.picker input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
#upload-list:empty { display: none; }
.upload-file { overflow-wrap: anywhere; }
.upload-file .hint { width: 100%; }
.standalone-field, #invite-modal .hint { margin-top: 16px; }
dialog .error { margin: 8px 0; }
.preview-modal { width: min(1100px, calc(100vw - 42px)); }
.preview-stage { position: relative; background: #111a19; display: grid; place-items: center; }
.preview-stage img { width: 100%; height: min(66dvh, 700px); object-fit: contain; display: block; }
.photo-close { position: absolute; top: 12px; right: 12px; color: white; border: 1px solid #ffffff55; background: #19201cdf; border-radius: 50%; }
.photo-close:hover { background: #2c3934; }
.preview-info { padding: 20px clamp(18px, 3vw, 34px); display: flex; align-items: start; justify-content: space-between; gap: 20px; }
.preview-details { min-width: 0; }
.preview-info p { margin-top: 6px; font-size: .875rem; color: var(--muted); line-height: 1.55; overflow-wrap: anywhere; }
.tag-list { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.tag-list span { background: #edf0e9; color: #414f43; border-radius: 3px; padding: 3px 7px; font-size: .8rem; overflow-wrap: anywhere; }
.preview-actions { display: grid; justify-items: end; gap: 4px; flex-shrink: 0; }
.danger { color: #974027; }
.danger-fill { background: #903b29; color: white; }
.toast { position: fixed; max-width: calc(100vw - 36px); left: 50%; bottom: 22px; transform: translateX(-50%); color: white; background: var(--ink); border-radius: 5px; padding: 12px 18px; box-shadow: 0 2px 15px #0002; font-size: .94rem; z-index: 20; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 780px) {
  .masthead { height: 68px; }
  .auth-layout { grid-template-columns: minmax(0,.9fr) minmax(0,1fr); }
  .cover-figure { min-height: 510px; }
  .auth-panel { padding: 25px; }
  .filter-row { align-items: flex-start; flex-wrap: wrap; }
  .empty { grid-template-columns: 1fr 30%; }
}
@media (max-width: 600px) {
  .shell { padding: 0 16px 18px; }
  .masthead { height: 60px; }
  .wordmark { font-size: 1.83rem; }
  .brand-icon { transform: scale(.86); transform-origin: left center; margin-right: 5px; }
  .guest-badge { font-size: .82rem; }
  .auth-layout { display: flex; flex-direction: column; margin-top: 15px; }
  .cover-figure { min-height: 0; height: clamp(150px, 23svh, 215px); }
  .cover-image { object-position: center 46%; }
  .cover-caption { left: 19px; bottom: 16px; gap: 4px; }
  .cover-byline { font-size: .75rem; gap: 6px; }
  .cover-title { font-size: 1.8rem; }
  .cover-dimension { font-size: .75rem; }
  .auth-panel { padding: 25px 20px 28px; }
  .auth-content { padding: 0; }
  .auth-content h1 { font-size: 2rem; }
  .auth-content .intro { margin: 9px 0 23px; }
  .field-stack { gap: 15px; }
  .account-menu { gap: 3px; }
  #account-name { display: none; }
  .gallery-heading { align-items: flex-start; padding: 29px 0 23px; gap: 8px; }
  .gallery-heading h1 { font-size: clamp(1.6rem, 6.5vw, 2.15rem); }
  .gallery-heading .btn { min-height: 40px; padding: 9px 10px; font-size: .875rem; white-space: nowrap; gap: 3px; }
  .gallery-heading .icon { width: 16px; height: 16px; }
  .chips { gap: 3px; }
  .chip { padding: 8px; }
  .empty { grid-template-columns: 1fr; }
  .empty-art { height: 110px; }
  .empty-content { padding: 25px 20px; }
  .preview-modal { width: calc(100vw - 20px); max-width: calc(100vw - 20px); }
  .preview-info { padding: 16px; flex-direction: column; gap: 12px; }
  .preview-actions { width: 100%; display: flex; align-items: center; justify-content: space-between; }
  .preview-stage img { height: min(50dvh, 540px); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
