@font-face{font-family:Gaegu;src:url('/static/Gaegu.ttf') format('truetype');font-display:swap}
:root{color-scheme:light;--ink:#243b30;--muted:#53665b;--paper:#fffefa;--ground:#f6f2e9;--edge:#ded7ca;--green:#315849;--hand:Gaegu,cursive}
*{box-sizing:border-box}
[hidden]{display:none!important}
body{margin:0;background:var(--ground);color:var(--ink);font:1rem/1.55 system-ui,sans-serif}
a{color:inherit;text-decoration:none}
a:focus-visible,button:focus-visible,input:focus-visible{outline:3px solid #a05235;outline-offset:3px}
button,input,select{font:inherit;color:inherit}
img{display:block;max-width:100%}
.shell{width:min(100% - 32px,60rem);margin-inline:auto}
header{background:var(--paper);border-bottom:1px solid var(--edge);padding-top:env(safe-area-inset-top)}
.bar{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:64px}
.brand{display:flex;align-items:center;gap:8px;font:1.55rem/1 var(--hand);white-space:nowrap}
.brand img{width:36px;border-radius:10px}
.account{display:flex;align-items:center;gap:8px;font-size:.875rem;min-width:0}
.account span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.quiet,.button{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:8px 13px;border-radius:9px;white-space:nowrap;cursor:pointer;font-size:.875rem;font-weight:650}
.quiet{background:transparent;border:1px solid var(--edge)}
.button{background:var(--green);color:white;border:1px solid var(--green)}
.button:hover{background:#234338}
.button:disabled{opacity:.65;cursor:wait}
main{padding-block:28px calc(104px + env(safe-area-inset-bottom))}
nav{position:fixed;bottom:0;left:0;right:0;z-index:2;border-top:1px solid var(--edge);background:var(--paper);padding-bottom:env(safe-area-inset-bottom)}
nav .bar{max-width:650px}
nav a{flex:1;text-align:center;padding:12px;border-radius:9px;font-size:.95rem}
nav a[aria-current]{background:#e4ece3;font-weight:700}
h1,h2,p{margin:0;overflow-wrap:anywhere}
h1{font:clamp(2.25rem,7vw,3.75rem)/1.05 var(--hand)}
h2{font-size:1.1rem}
.heading,.actions{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-block:12px 18px}
.paper{background:var(--paper);border:1px solid var(--edge);border-radius:16px;box-shadow:0 4px 12px #33211509}
.panel{padding:clamp(16px,4vw,32px);max-width:40rem;margin-inline:auto}
.stack{display:grid;gap:16px}
label{display:grid;gap:6px;font-size:.95rem;font-weight:650;min-width:0}
input,select{width:100%;min-width:0;background:#fff;border:1px solid #b8b7aa;border-radius:8px;padding:10px;min-height:46px;font-size:1rem}
.hand,.caption{font-family:var(--hand)}
.hand{font-size:1.45rem}
.upload{background:#f3f5eb;border:1px dashed #829489;border-radius:12px;padding:14px;gap:10px;overflow:hidden}
.upload img{max-height:280px;margin:auto;object-fit:contain}
small,.meta{color:var(--muted);overflow-wrap:anywhere;font-size:.85rem}
.login{max-width:48rem;margin:16px auto;display:grid;grid-template-columns:1fr 1fr;border-radius:20px;overflow:hidden;box-shadow:0 8px 32px #33211512}
.login .paper{max-width:none;width:100%;border:0;border-radius:0;display:grid;align-content:center;gap:20px}
.cover{display:grid;align-content:center;justify-items:center;gap:14px;text-align:center;color:#fffefa;background:#315849;padding:28px;min-height:370px}
.cover img{width:110px;border-radius:25px}
.error{background:#f7e5dc;color:#762a1d;padding:10px;border-radius:8px;margin:0}
.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,235px),1fr));gap:16px}
.card a{display:block;padding:12px;text-align:center;min-height:100%}
.card img,.detail img{object-fit:contain;width:100%;aspect-ratio:1;background:white;border-radius:8px}
.caption{font-size:clamp(1.55rem,4vw,2.25rem);line-height:1.2;margin:12px 0 6px}
.drawing-pending{display:grid;place-items:center;min-height:130px;background:#f3f5eb;border:1px dashed #b3c0ad;border-radius:8px;color:var(--muted);text-align:center;padding:16px}
.calendar-pending{font-size:.75rem}
.detail{max-width:520px;margin:auto;padding:16px;text-align:center}
.actions{max-width:520px;margin-inline:auto}
.empty{display:grid;justify-items:center;gap:14px;padding:40px 12px;text-align:center}
.empty img{width:78px;border-radius:18px}
.journal-page{background:#fff;color:#232722}
.journal-page main{width:min(100% - 32px,40rem);padding-top:calc(18px + env(safe-area-inset-top))}
.journal-page nav{background:#fff;border-color:#eeefeb}
.journal-page nav .bar{min-height:54px}
.journal-page nav a{font-size:.875rem;color:#5f655e}
.journal-page nav a[aria-current]{position:relative;background:transparent;color:#2e5943}
.journal-page nav a[aria-current]::after{content:"";position:absolute;inset:auto calc(50% - 8px) 5px;height:2px;border-radius:2px;background:#70937d}
.journal-heading{min-height:50px;margin:0 0 24px}
.journal-heading h1,.calendar-heading h1{font:1.55rem/1.1 var(--hand)}
.journal-text-button{display:inline-flex;align-items:center;min-height:44px;padding:0 4px;border:0;background:transparent;color:#526457;font-size:.875rem;cursor:pointer}
.journal-page :is(.card,.detail,.empty){border:0;border-radius:0;background:#fff;box-shadow:none}
.journal-page .card a{padding:0 3px 10px;border-radius:8px}
.journal-page .card a:hover .caption{color:#315849}
.journal-page .card img{border-radius:0}
.journal-page .card .caption{font-size:clamp(1.45rem,5vw,1.9rem);margin:7px 0 4px}
.journal-page .card .drawing-pending{min-height:0;aspect-ratio:1}
.journal-page .drawing-pending{background:#f4f6f2;border:0}
.album-gallery .empty img{display:none}
.album-deck{width:min(100% - 22px,26rem);margin:24px auto 0;touch-action:pan-y pinch-zoom}
.album-sheet{position:relative;isolation:isolate;background:#fff;border:1px solid #e4e9e0;border-radius:21px;box-shadow:0 5px 20px #253a2d10;text-align:center}
.album-sheet.stacked::before,.album-sheet.stacked::after{content:"";position:absolute;z-index:-1;pointer-events:none;inset:8px 9px -7px;border:1px solid #e1e7df;border-radius:20px;background:#f3f6f1;transform:rotate(3deg)}
.album-sheet.stacked::after{inset:9px 13px -11px;z-index:-2;transform:rotate(-3deg);background:#f9faf8}
.album-sheet>a{display:block;position:relative;padding:8px 12px 20px;border-radius:inherit;background:#fff}
.album-sheet img,.album-sheet .drawing-pending{width:100%;height:auto;min-height:0;aspect-ratio:1;object-fit:contain;border-radius:12px}
.album-sheet img{user-select:none;-webkit-user-drag:none}
.album-pager{display:grid;grid-template-columns:44px 1fr 44px;align-items:center;margin:19px auto 0;text-align:center;max-width:13rem}
.album-pager a{display:grid;place-items:center;min-height:44px;border-radius:50%;font:1.65rem/1 system-ui,sans-serif;color:#4b594b}
.album-pager a:hover{background:#f2f5f0}
.compose-page main{max-width:30rem}
.compose-page .journal-heading{margin-bottom:14px}
.compose-form{margin-inline:auto;gap:20px}
.compose-form label{font-size:.875rem;font-weight:600}
.compose-form input:not([type=file]),.compose-form select{border:0;border-radius:0;padding-inline:2px}
.compose-form input::placeholder{color:#747b71}
.compose-form .button{justify-self:center;min-height:48px;border-radius:24px;padding-inline:28px}
.compose-metadata{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.compose-metadata label{gap:0;color:#526457}
.compose-metadata input:not([type=file]),.compose-metadata select{border-bottom:1px solid #ccd5ca;background:transparent}
.compose-sheet{background:#fff;border-radius:20px;padding:12px 16px 16px;box-shadow:0 6px 22px #1f382f0e,0 0 0 1px #e3e9df}
.photo-picker{position:relative;min-height:clamp(205px,53vw,320px);place-content:center;justify-items:center;gap:6px;padding:10px 4px;color:#314b3b;text-align:center;cursor:pointer}
.photo-picker:focus-within{outline:3px solid #a05235;outline-offset:3px}
.photo-picker input[type=file]{position:absolute;width:1px;height:1px;min-height:0;padding:0;opacity:0;pointer-events:none}
.photo-picker img{max-height:clamp(180px,48vw,300px);object-fit:contain;border-radius:8px}
.photo-picker img:not([hidden])~.photo-plus{display:none}
.photo-plus{display:grid;place-items:center;width:46px;height:46px;margin-bottom:3px;border-radius:50%;background:#edf3eb;color:#426550;font:1.9rem/1 var(--hand)}
.sheet-caption{justify-items:stretch;gap:2px;border-top:1px solid #e6ebe4;padding-top:11px;color:#526457;text-align:center}
.sheet-caption input{text-align:center}
.compose-note{text-align:center;margin-top:-10px}
.calendar-heading{flex-wrap:wrap;gap:10px;margin:0 0 clamp(24px,7vw,42px)}
.calendar-switch{display:flex;gap:2px;padding:3px;background:#f1f2ee;border-radius:24px}
.calendar-switch a{display:grid;place-items:center;min-height:44px;padding:0 11px;border-radius:21px;color:#545c53;font-size:.875rem;font-weight:600}
.calendar-switch a[aria-current]{background:#fff;color:#294936;box-shadow:0 1px 3px #243b3018}
.calendar-period{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:12px}
.calendar-period h2{font:clamp(2rem,7vw,2.7rem)/1 var(--hand);white-space:nowrap}
.calendar-period h2 span{margin-inline-start:5px;color:#666e63;font-size:.76em}
.period-controls{display:grid;grid-template-columns:repeat(2,44px);gap:1px}
.period-controls a{display:grid;place-items:center;min-height:44px;border-radius:50%;font:1.65rem/1 system-ui,sans-serif;color:#4b594b}
.period-controls a:hover,.period-controls a:focus-visible{background:#f2f5f0}
.calendar table{width:100%;table-layout:fixed;border-collapse:collapse}
.calendar th{font-size:.875rem;font-weight:500;padding:5px 0 10px;color:#686e66}
.calendar td{padding:0 1px;vertical-align:middle}
.date{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:2px;height:clamp(51px,13.7vw,79px);border-radius:9px}
.date>span{font:1.35rem/1 var(--hand)}
.date.future:not(.date-art)>span{color:#777d72}
.date img{width:100%;height:100%;max-width:77px;object-fit:contain}
.date:hover,.date[aria-current]{background:#f2f6ef}
.date.today span{color:#315849;text-decoration:underline;text-underline-offset:4px}
.date-art.today{box-shadow:inset 0 -2px #90aa91}
.calendar-records{margin-top:24px;scroll-margin-top:16px}
.calendar-records summary{width:max-content;max-width:100%;min-height:44px;display:list-item;padding:10px 0;font-size:.875rem;color:#566353;cursor:pointer}
.calendar-records[open] .cards{margin-top:10px}
.calendar-cover-hint{margin-bottom:12px}
.journal-page .calendar-cover-card>a{min-height:0}
.calendar-cover,.calendar-cover-status{text-align:center}
.calendar-cover-status{padding:10px 0;color:#315849;font-size:.875rem}
.calendar-text-link{display:inline-flex;min-height:44px;align-items:center;color:#355842;font-size:.875rem}
.calendar-current{margin-top:12px}
.year-grid{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:2px;padding-top:6px}
.mini-day{display:grid;place-items:center;aspect-ratio:1;border-radius:5px}
.mini-day img{width:100%;height:100%;object-fit:contain}
.mini-day:is(a):hover,.mini-today{background:#edf3eb}
.mini-dot{height:4px;width:4px;background:#d9ddd5;border-radius:50%}
.mini-dot.waiting{background:#a16943;height:7px;width:7px}
@media(min-width:680px){
  .year-grid{grid-template-columns:repeat(16,minmax(0,1fr));gap:3px}
}
@media(max-width:580px){
  .login{grid-template-columns:1fr}
  .cover{min-height:auto;padding:24px}
  .cover img{width:74px}
  .cover h1 br{display:none}
  .account{gap:4px}
  .account .quiet{padding-inline:7px}
}

