:root{font-family:system-ui,-apple-system,"Malgun Gothic",sans-serif;color:#17304c;background:#f5f8fc;font-size:16px}*{box-sizing:border-box}body{margin:0}a{color:#205c9b;text-decoration:none}button,input,select,textarea{font:inherit}button,.button{cursor:pointer;border:0;border-radius:12px;padding:13px 20px;font-weight:700;display:inline-block}.primary{background:#175b9d;color:white}.primary:hover{background:#0d467f}.secondary{background:#e9f1fa;color:#174f83}.danger{background:none;color:#aa3650;padding-left:0}.text-button{background:none;color:#6b7d91;padding:4px}.top{background:#fff;border-bottom:1px solid #e3eaf3;display:flex;align-items:center;justify-content:space-between;gap:20px;padding:16px max(24px,calc((100vw - 1120px)/2))}.brand{font-size:21px;font-weight:800;color:#174f83;white-space:nowrap}.top nav{display:flex;gap:20px;flex-wrap:wrap}.top nav a{color:#334f69;font-weight:650}main{max-width:1168px;padding:36px 24px 70px;margin:auto;min-height:70vh}footer{text-align:center;padding:24px}.eyebrow{color:#3372a7;font-size:13px;font-weight:800;letter-spacing:.1em;text-transform:uppercase}h1{font-size:clamp(27px,4vw,40px);margin:9px 0 8px;line-height:1.25}h2{font-size:21px;margin:0 0 20px}p{line-height:1.55}.page-heading{display:flex;justify-content:space-between;align-items:end;gap:20px;margin-bottom:26px}.page-heading p{color:#64788d;margin:0}.panel{background:#fff;border:1px solid #e4ebf4;border-radius:20px;padding:28px;box-shadow:0 10px 30px rgba(26,69,112,.04)}.notice{background:#e5f3ec;border:1px solid #b5dcc6;padding:13px 18px;border-radius:12px;margin-bottom:20px}.auth{max-width:470px;margin:35px auto}.auth p{color:#64788d}.auth h1{margin-bottom:8px}form label{display:block;font-weight:700;margin:18px 0;color:#294760}label small{display:block;font-size:13px;color:#718499;font-weight:400;margin-top:6px}input,select,textarea{width:100%;display:block;background:white;border:1px solid #cbd9e8;border-radius:10px;padding:13px;margin-top:8px;color:#17304c}input:focus,select:focus,textarea:focus{outline:3px solid #a7d0f4;border-color:#2771b4}input[type=file]{padding:17px}.filters{display:flex;gap:12px;align-items:end;flex-wrap:wrap;margin:0 0 25px}.filters label{margin:0;font-size:14px;min-width:160px}.filters input,.filters select{margin-top:5px}.filters button{height:48px}.clear{padding:12px}.gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(245px,1fr));gap:18px}.card{background:white;border:1px solid #e3eaf3;border-radius:18px;overflow:hidden;color:inherit;box-shadow:0 6px 20px rgba(27,67,111,.05)}.card:hover{transform:translateY(-2px);box-shadow:0 12px 24px rgba(27,67,111,.12)}.visual{height:220px;background:linear-gradient(130deg,#a9c7e8,#d4e4f2);display:grid;place-items:center;position:relative}.visual img{width:100%;height:100%;object-fit:cover}.play{background:#fff;color:#175b9d;border-radius:50%;height:64px;width:64px;display:grid;place-items:center;font-size:22px;padding-left:4px}.video-label{position:absolute;bottom:12px;left:14px;color:#17304c;font-weight:700}.card-copy{padding:16px}.card-copy time{font-size:13px;color:#718499}.card-copy p{font-weight:700;margin:9px 0;overflow-wrap:anywhere}.card-copy small,.list small{color:#718499}.pill{font-size:12px;background:#e8f1fb;color:#205c9b;border-radius:20px;padding:5px 9px;margin-left:8px}.empty{text-align:center;padding:70px 24px}.empty p,.muted{color:#718499}.empty-icon{font-size:45px;color:#8ab4dd}.form-wide{max-width:700px}.row{display:grid;grid-template-columns:1fr 1fr;gap:18px}.columns{display:grid;grid-template-columns:1fr 1fr;gap:20px}.list{margin-top:25px;border-top:1px solid #e4ebf4}.list>div{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #e4ebf4;padding:12px 0}.back{display:inline-block;margin-bottom:20px}.detail{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(300px,1fr);gap:22px}.detail-media{background:#152a40;min-height:350px;border-radius:18px;display:grid;place-items:center;overflow:hidden}.detail-media img,.detail-media video{max-width:100%;max-height:78vh}.detail-side{background:white;border:1px solid #e4ebf4;border-radius:18px;padding:26px}.detail-side h1{font-size:26px;overflow-wrap:anywhere}.detail-side>form{margin:22px 0}.comment{border-top:1px solid #e8edf4;padding:14px 0}.comment small{float:right;color:#718499}.comment p{margin:6px 0;white-space:pre-wrap;overflow-wrap:anywhere}@media(max-width:720px){.top{align-items:start;flex-direction:column;padding:16px 20px}.top nav{gap:14px;font-size:14px}main{padding:28px 16px 60px}.page-heading{align-items:start;flex-direction:column}.gallery{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.visual{height:160px}.card-copy{padding:12px}.card-copy p{font-size:14px}.row,.columns,.detail{grid-template-columns:1fr}.detail-media{min-height:260px}.panel{padding:20px}}@media(max-width:390px){.gallery{grid-template-columns:1fr}.visual{height:230px}}
[hidden]{display:none!important}progress{display:block;width:100%;height:22px;margin-top:20px;accent-color:#175b9d}.pagination{display:flex;gap:15px;justify-content:center;margin-top:30px}button:disabled{opacity:.5;cursor:wait}

/* Responsive application shell */
:root{font-family:"Malgun Gothic","Apple SD Gothic Neo","Noto Sans KR",Arial,sans-serif;line-height:1.5;font-synthesis:none}
body{min-height:100dvh;display:flex;flex-direction:column;overflow-wrap:break-word}
main{width:100%;flex:1;min-height:0;padding-top:28px;padding-bottom:36px}
.top{padding-top:14px;padding-bottom:14px}.brand{display:flex;align-items:center;gap:10px}.brand-icon{width:34px;height:34px;border-radius:10px}
.top nav a{padding:8px 0;white-space:nowrap}.top nav a:hover{text-decoration:underline}
.install-strip{width:100%;max-width:1168px;margin:0 auto;padding:16px 24px 0;display:flex;align-items:center;justify-content:space-between;gap:12px;color:#526981;font-size:14px}
.install-strip button{flex-shrink:0;padding:10px 14px;min-height:44px}
.form-wide{margin-left:auto;margin-right:auto;max-width:760px;width:100%}
.row{grid-template-columns:repeat(2,minmax(0,1fr))}.row>*{min-width:0}
input,select,textarea{min-width:0;max-width:100%;min-height:48px;font-size:16px}
input[type=file]{white-space:normal;font-size:14px;padding:12px}input[type=file]::file-selector-button{border:0;border-radius:8px;padding:10px 14px;margin-right:12px;background:#e9f1fa;color:#174f83;font:inherit;font-weight:700;cursor:pointer}
.empty{padding:42px 24px}.empty-icon{display:block;width:64px;height:64px;border-radius:18px;margin:0 auto 18px}.empty h2{margin-bottom:8px}.empty p{margin-bottom:24px}
.filters label{flex:0 1 180px}.filters .clear{min-height:44px}.panel{box-shadow:0 8px 24px #17304c06}
footer{padding:20px 24px 28px}.text-button{min-height:44px;padding:10px 18px}
dialog{width:min(460px,calc(100% - 32px));border:1px solid #dbe5ef;border-radius:22px;padding:28px;color:#17304c;box-shadow:0 24px 80px #0003}dialog::backdrop{background:#17304c66}dialog button{width:100%}dialog p{line-height:1.7}
@media(max-width:720px){.top{gap:10px;padding:14px 16px}.brand{font-size:20px}.top nav{width:100%;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px}.top nav a{text-align:center;border-radius:8px;background:#f5f8fc;font-size:14px;min-height:44px;display:grid;place-items:center}.install-strip{padding:12px 16px 0;font-size:13px}.install-strip span{max-width:220px}main{padding:22px 16px 24px}.page-heading{gap:16px;margin-bottom:22px}.page-heading>.button{width:100%;text-align:center}.row{grid-template-columns:1fr;gap:0}.panel{padding:20px}.empty{padding:36px 20px}.filters{gap:10px}.filters label{flex:1 1 calc(50% - 10px);min-width:0}.filters button,.filters .clear{flex:1;text-align:center}.form-wide>button{width:100%}.columns{min-width:0}.detail{min-width:0}footer{padding-bottom:max(16px,env(safe-area-inset-bottom))}}

.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.file-picker{border:2px dashed #cbd9e8;border-radius:16px;padding:20px;text-align:center}.file-picker label{margin:0;cursor:pointer}.file-picker:focus-within{outline:3px solid #a7d0f4}.file-picker p{margin:12px 0 0;font-size:14px}.selected-files{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;max-height:430px;overflow-y:auto}.selected-file{border:1px solid #e3eaf3;border-radius:12px;padding:8px;min-width:0;display:flex;flex-direction:column;gap:8px}.selected-file img{width:100%;height:110px;object-fit:cover;border-radius:8px}.selected-file span{overflow-wrap:anywhere;font-size:12px}.selected-file button{margin-top:auto;min-height:44px;padding:8px}.date-heading{grid-column:1/-1;margin:16px 0 0;font-size:20px;padding-bottom:10px;border-bottom:1px solid #dbe5ef}@media(max-width:480px){.selected-files{grid-template-columns:repeat(2,minmax(0,1fr))}}
.secret-crumbs{overflow-wrap:anywhere;margin-bottom:18px;line-height:2}.secret-files{display:grid;gap:12px}.secret-file{display:flex;align-items:center;gap:16px;padding:20px;color:#17304c}.secret-file strong{flex:1;min-width:0;overflow-wrap:anywhere}.secret-file .pill{margin-left:0;flex-shrink:0}.secret-file>span:last-child{white-space:nowrap}.secret-title{font-size:clamp(20px,4vw,30px);overflow-wrap:anywhere;margin-bottom:20px}.secret-player{background:#101a25;border-radius:18px;overflow:hidden}.secret-player video{display:block;width:100%;max-height:75vh}@media(max-width:480px){.secret-file{padding:16px;gap:10px}.secret-file>span:last-child{font-size:12px}}

/* Dense, square album tiles. Small phones keep three columns where readable. */
.gallery{grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.gallery .card{border-radius:10px;min-width:0}.gallery .visual{height:auto;aspect-ratio:1;overflow:hidden}.gallery .visual>img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}.gallery .play{position:absolute;right:8px;top:8px;height:28px;width:28px;font-size:12px;background:#ffffffdd}.gallery .video-label{font-size:11px;left:8px;bottom:7px;background:#ffffffe0;padding:2px 5px;border-radius:5px}.gallery .card-copy{padding:9px}.gallery .card-copy p{font-size:13px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;margin:4px 0}.gallery .card-copy>time{display:none}.gallery .card-copy small{font-size:11px}.gallery .pill{font-size:10px;margin:0;padding:2px 5px}.selected-file.is-duplicate{border-color:#92c5a6;background:#f0f8f3}.upload-badge{font-weight:700;color:#245f3e;font-size:12px}.upload-badge.checking{color:#64788d}.upload-receipts{margin-top:16px;padding-left:20px;font-size:14px;max-height:200px;overflow:auto}.upload-receipts li{padding:4px 0}
@media(min-width:1100px){.gallery{grid-template-columns:repeat(5,minmax(0,1fr))}}
@media(max-width:720px){.gallery{grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}.gallery .card{border-radius:6px}.gallery .card-copy{padding:5px}.gallery .card-copy p{font-size:11px}.gallery .card-copy small{display:none}.gallery .date-heading{font-size:17px;margin-top:12px;padding-bottom:6px}}
@media(max-width:329px){.gallery{grid-template-columns:repeat(2,minmax(0,1fr))}}
.upload-history{margin-top:24px}.upload-history p{overflow-wrap:anywhere}

.media-navigation{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:12px}.media-navigation>span:not(.button){font-size:14px;color:#64788d}.unavailable{opacity:.4;cursor:default}.swipe-viewer{touch-action:pan-y pinch-zoom;transition:transform .1s ease,opacity .1s ease}.swipe-viewer img{user-select:none;-webkit-user-drag:none}.swipe-left{transform:translateX(-16px);opacity:.5}.swipe-right{transform:translateX(16px);opacity:.5}.swipe-hint{text-align:center;color:#718499;font-size:13px;margin:10px 0}.swipe-viewer video{touch-action:auto}@media(prefers-reduced-motion:reduce){.swipe-viewer{transition:none}.swipe-left,.swipe-right{transform:none}}
.memories-home{margin-top:42px;padding-top:28px;border-top:1px solid #dbe5ef}.memories-home h2{margin-bottom:8px}
.album-tabs{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:24px}.gallery .card{border:0;box-shadow:none}.tile-marks{position:absolute;left:5px;bottom:5px;display:flex;gap:4px}.tile-mark{background:#ffffffeb;border-radius:5px;padding:2px 5px;font-size:10px;font-weight:700;color:#25415c}.tile-selection{display:none;position:absolute;right:6px;top:6px;border:2px solid #fff;border-radius:50%;width:26px;height:26px;background:#17304c44;color:transparent;text-align:center;line-height:22px}.selectable .tile-selection{display:block}.is-selected .tile-selection{background:#175b9d;color:white}.selectable.is-selected{outline:3px solid #175b9d;outline-offset:-3px}.selectable .play{left:6px;right:auto}.selection-toolbar{position:sticky;top:0;z-index:3;background:#f5f8fcf5;border:1px solid #dbe5ef;border-radius:12px;padding:10px;margin:16px 0;display:flex;align-items:center;gap:10px;flex-wrap:wrap}.selection-toolbar p:empty{display:none}.selection-toolbar p{margin:0;width:100%;font-size:13px}#selection-actions{display:flex;gap:6px;flex-wrap:wrap}.batch-list{margin:20px 0}.batch-row{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:12px 0;border-top:1px solid #e3eaf3}.batch-row a{overflow-wrap:anywhere}.photo-story p{white-space:pre-wrap;overflow-wrap:anywhere}.photo-story h2{margin-top:16px;margin-bottom:8px}@media(max-width:600px){.selection-toolbar button,.album-tabs .button{font-size:13px;padding:10px}.batch-row{align-items:flex-start;flex-direction:column}.tile-mark{font-size:9px;padding:2px 4px}}

#viewer-content .swipe-viewer{position:relative;height:min(70svh,680px);min-height:240px;transition:none}#viewer-content .swipe-viewer>img,#viewer-content .swipe-viewer>video{width:100%;height:100%;object-fit:contain;max-height:100%}.slide-frame{position:absolute;inset:0;display:grid;place-items:center;background:#152a40}.slide-frame>img,.slide-frame>video{width:100%;height:100%;object-fit:contain;max-height:100%}#viewer-content[aria-busy=true] .media-navigation a{pointer-events:none;opacity:.6}.inbox-badge{display:inline-block;background:#175b9d;color:white;padding:0 5px;margin-left:4px;border-radius:20px;font-size:11px}.inbox-list{display:grid;gap:12px}.inbox-entry{padding:0;overflow:hidden}.inbox-entry.unread{border-color:#8ab4dd}.inbox-open{width:100%;display:flex;align-items:center;gap:18px;text-align:left;background:white;border-radius:0;padding:16px;font-weight:400;color:#17304c}.inbox-open img{width:90px;height:90px;object-fit:cover;border-radius:12px;flex-shrink:0}.inbox-copy{display:flex;flex-direction:column;gap:8px;min-width:0}.inbox-copy>span{font-size:13px}.new-dot{display:inline-block;width:8px;height:8px;background:#2876ba;border-radius:50%;margin-right:6px}@media(max-width:720px){.top nav{grid-template-columns:repeat(auto-fit,minmax(58px,1fr))}.inbox-open{padding:12px;gap:12px}.inbox-open img{width:74px;height:74px}}
