@charset "UTF-8";
:root { color-scheme: light; --ink: #233d38; --muted: #61726e; --paper: #f7f8f3; --line: #dce4dc; --green: #285e50; --light: #e9f1e8; --pink: #9e4052; --warning: #784216; font-family: "Segoe UI", "Malgun Gothic", "Apple SD Gothic Neo", sans-serif; color: var(--ink); background: var(--paper); font-size: 16px; }
* { box-sizing: border-box; }
body { margin: 0; line-height: 1.6; overflow-wrap: anywhere; }
button, input, textarea, select { font: inherit; }
button, a, select, textarea { -webkit-tap-highlight-color: transparent; }
button, select { cursor: pointer; }
a { color: inherit; text-decoration: none; }
button:disabled { cursor: wait; opacity: .6; }
img { display: block; width: 100%; }
button, a, textarea, select { outline-offset: 4px; }
:focus-visible { outline: 3px solid #a26612; }
h1, h2, p { margin-top: 0; }
h1 { font-size: clamp(1.8rem, 5vw, 2.6rem); letter-spacing: -.05em; line-height: 1.3; margin-bottom: .6rem; }
h2 { font-size: 1.2rem; line-height: 1.4; }
.demo-banner { position: sticky; top: 0; z-index: 10; background: #fff1cf; color: #5d3d12; border-bottom: 1px solid #e3c581; padding: 9px 24px; display: flex; align-items: center; justify-content: center; gap: 6px 20px; flex-wrap: wrap; font-size: .82rem; }
.demo-banner strong { font-size: .88rem; }
.demo-role { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.demo-role select { min-height: 44px; font-size: 16px; padding: 4px 8px; }
.demo-role small { font-size: .75rem; }
.site-header, .main-nav, .main-content, .site-footer { width: min(1120px, calc(100% - 48px)); margin: auto; }
.site-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; min-height: 90px; padding-block: 12px; }
.brand { display: inline-flex; align-items: center; gap: 12px; min-width: 0; max-width: 100%; font-size: 1.25rem; font-weight: 700; letter-spacing: -.04em; min-height: 44px; }
.brand-mark { flex-shrink: 0; width: 38px; height: 38px; display: grid; place-items: center; background: var(--green); color: white; border-radius: 12px; font-size: 1.6rem; }
.viewer { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; min-width: 0; max-width: 100%; margin-left: auto; font-size: .9rem; }
.viewer-name { min-width: 0; max-width: 100%; }
.role-badge { border-radius: 100px; background: var(--light); color: #315b4c; padding: 3px 11px; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.role-badge.owner { background: #e7e8f4; color: #4e4985; }
.role-badge.uploader { background: #f5e8d4; color: #725328; }
.main-nav { display: flex; flex-wrap: wrap; gap: 4px 24px; border-bottom: 1px solid var(--line); }
.main-nav a { position: relative; min-height: 52px; display: flex; align-items: center; font-weight: 600; color: var(--muted); padding: 0 4px; }
.main-nav a[aria-current="page"] { color: var(--green); }
.main-nav a[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; border-radius: 3px; background: var(--green); }
.main-content { padding-top: 40px; min-height: 65vh; }
.page-heading { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 28px; }
.page-heading > div { min-width: 0; max-width: 100%; }
.eyebrow { color: #628174; font-size: .8rem; font-weight: 700; letter-spacing: .08em; margin-bottom: 9px; }
.muted { color: var(--muted); font-size: .9rem; margin-bottom: .6rem; }
.heading-actions { flex-shrink: 0; }
.capability-note { font-size: .82rem; color: #586861; border: 1px dashed #aabbb1; border-radius: 8px; padding: 10px 14px; display: block; }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 24px; }
.photo-card, .album-card { background: white; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; min-width: 0; }
.photo-link { display: block; overflow: hidden; }
.photo-image { aspect-ratio: 4/3; object-fit: cover; background: #e4ece7; }
.photo-link .photo-image { transition: transform .2s ease; }
.photo-link:hover .photo-image { transform: scale(1.025); }
.card-copy { padding: 18px 18px 12px; }
.card-title { display: block; min-height: 44px; font-size: 1.05rem; font-weight: 700; overflow-wrap: anywhere; }
.card-copy .muted { font-size: .78rem; }
.card-actions { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: flex-start; justify-content: space-between; margin-top: 6px; }
.like-box { min-width: 0; }
.like-button { border: 1px solid #d9e3dd; padding: 8px 10px; background: #fff; border-radius: 10px; display: flex; align-items: center; gap: 6px; min-height: 44px; color: #53675f; font-size: .8rem; }
.like-button > span:first-child { font-size: 1.25rem; line-height: 1; }
.like-button.is-liked { background: #fff0f1; border-color: #efcad0; color: #94374a; }
.like-button strong { font-size: .85rem; min-width: 12px; }
.button { min-height: 44px; min-width: 44px; max-width: 100%; padding: 10px 20px; border: 1px solid var(--green); background: var(--green); color: white; border-radius: 10px; font-weight: 600; white-space: normal; overflow-wrap: anywhere; }
.button:hover:not(:disabled) { filter: brightness(.94); }
.button.secondary { background: white; color: var(--green); border-color: #b8c9bf; }
.button.small { padding: 8px 16px; font-size: .88rem; }
.text-button { min-height: 44px; min-width: 44px; max-width: 100%; border: 0; background: transparent; color: var(--green); font-size: .85rem; display: inline-flex; align-items: center; padding: 8px 10px; text-decoration: underline; text-underline-offset: 4px; white-space: normal; overflow-wrap: anywhere; }
.danger { background: #9c3347; border-color: #9c3347; }
.danger-text { color: #9c3347; }
.back-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); font-size: .9rem; margin-bottom: 16px; }
.load-more { text-align: center; padding: 28px 0 12px; }
.empty-state { text-align: center; padding: 44px 20px; color: var(--muted); background: white; border-radius: 16px; grid-column: 1/-1; }
.empty-state p { margin-bottom: 16px; }
.empty-icon { display: block; color: #93a89a; font-size: 2rem; }
.error, .notice { border-radius: 8px; padding: 12px; font-size: .88rem; background: #fff0e7; color: #7b3c20; margin: 8px 0; overflow-wrap: anywhere; }
.inline-feedback:empty { display: none; }
.inline-feedback { max-width: 260px; }
.image-placeholder { display: grid; place-items: center; padding: 20px; font-size: .85rem; text-align: center; color: #566e62; }
.detail-navigation { display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: space-between; align-items: center; }
.neighbors { display: flex; gap: 8px; }
.album-breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-bottom: 12px; overflow-wrap: anywhere; }
.album-breadcrumbs a { min-height: 44px; padding: 8px 0; color: var(--green); }
.album-breadcrumbs [aria-current="page"] { font-weight: 700; }
.album-children { margin-bottom: 40px; }
.photo-operation { border: 1px solid #d6c185; border-radius: 14px; padding: 20px; margin-bottom: 28px; background: #fffaeb; }
.photo-operation h2 { font-size: 1.1rem; }
.photo-operation .button, .photo-delete-confirm .button { margin: 4px 8px 4px 0; }
.photo-delete-control { margin-top: 16px; }
.photo-delete-confirm { padding: 16px; border: 1px solid #e4b7bf; border-radius: 10px; background: #fff5f5; }
.photo-detail { overflow: hidden; border-radius: 20px; border: 1px solid var(--line); background: white; }
.detail-image { object-fit: contain; max-height: 650px; background: #e8ede5; aspect-ratio: 16/10; }
.detail-copy { padding: 28px 32px; }
.description { white-space: pre-wrap; overflow-wrap: anywhere; }
.photo-dates { display: flex; flex-wrap: wrap; gap: 6px 24px; margin: 12px 0 18px; }
.photo-dates .muted { font-size: .8rem; }
textarea { display: block; width: 100%; resize: vertical; border: 1px solid #b7c7bd; border-radius: 8px; background: #fcfdfb; color: var(--ink); padding: 12px; line-height: 1.6; min-height: 100px; }
.own-label { color: var(--green); background: var(--light); border-radius: 8px; padding: 0 7px; font-size: .75rem; }
.delete-confirm { margin-top: 16px; }
.delete-confirm p { margin-bottom: 5px; }
.activity-tabs { display: flex; gap: 8px; border-bottom: 1px solid var(--line); margin-top: 10px; }
.activity-tabs a { min-height: 48px; padding: 10px 18px; border-bottom: 3px solid transparent; color: var(--muted); }
.activity-tabs a.selected { border-color: var(--green); color: var(--green); font-weight: 700; }
.list-toolbar { display: flex; gap: 16px; justify-content: space-between; align-items: center; margin: 24px 0; }
.list-toolbar .muted { margin: 0; font-size: .82rem; }
.sort-control { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.sort-control label { font-size: .8rem; color: var(--muted); }
select { max-width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid #b7c7bd; border-radius: 8px; color: var(--ink); background: white; }
.activity-thumb { width: 84px; aspect-ratio: 1; border-radius: 10px; object-fit: cover; background: var(--light); }
.site-footer { color: #718078; text-align: center; border-top: 1px solid var(--line); padding: 32px 0; margin-top: 50px; font-size: .78rem; }
.login-panel { max-width: 470px; margin: 20px auto 50px; border-radius: 20px; background: white; border: 1px solid var(--line); padding: 32px; }
.login-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; min-width: 0; }
.login-form h1 { font-size: 1.8rem; }
.login-form > label { font-size: .9rem; font-weight: 600; }
.login-form input:not([type="checkbox"]) { width: 100%; min-height: 48px; border: 1px solid #b7c7bd; border-radius: 8px; padding: 10px; background: #fcfdfb; color: var(--ink); }
.remember-label { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.remember-label input { flex-shrink: 0; width: 20px; height: 20px; }
.logout-button { min-height: 44px; font-size: .75rem; }
.upload-panel { max-width: 820px; padding: 24px; margin: 0 auto 24px; background: white; border: 1px solid var(--line); border-radius: 16px; }
.upload-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; min-width: 0; }
.login-form > *, .upload-form > *, .upload-list > * { min-width: 0; max-width: 100%; }
.upload-form label { font-weight: 600; font-size: .9rem; }
.upload-form input { min-width: 0; width: 100%; min-height: 44px; padding: 10px; border: 1px solid #b7c7bd; border-radius: 8px; background: #fcfdfb; color: var(--ink); }
.upload-form input::file-selector-button { min-height: 44px; margin-right: 12px; padding: 6px 12px; border: 1px solid #b7c7bd; border-radius: 6px; background: white; color: var(--green); font: inherit; }
.upload-form .button { justify-self: start; }
.upload-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.upload-item { padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfa; }
.upload-item-heading { display: flex; gap: 12px; align-items: start; justify-content: space-between; }
.upload-filename { overflow-wrap: anywhere; min-width: 0; }
.upload-status { flex-shrink: 0; font-size: .8rem; font-weight: 700; padding: 2px 9px; border-radius: 8px; background: var(--light); }
.upload-failed .upload-status { color: #9c3347; background: #fff0f1; }
.upload-uncertain .upload-status { color: #785018; background: #fff1cf; }
.upload-item .muted { margin: 8px 0 0; }
.upload-summary { margin: 10px 0 0; font-size: .9rem; }
.demo-upload-controls { display: grid; gap: 10px; background: #fff9e9; border-radius: 10px; padding: 16px; }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link:focus { position: fixed; top: 0; left: 0; z-index: 20; padding: 12px; background: white; color: var(--green); }
@media (max-width: 850px) { .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .page-heading { align-items: start; flex-direction: column; } .demo-banner { padding: 8px 14px; gap: 2px 12px; } }
@media (max-width: 540px) {
  .site-header, .main-nav, .main-content, .site-footer { width: calc(100% - 32px); }
  .site-header { min-height: 82px; gap: 10px; }
  .brand { font-size: 1.05rem; gap: 8px; }
  .brand-mark { width: 32px; height: 32px; border-radius: 10px; }
  .viewer { flex-direction: column; align-items: flex-end; gap: 2px; font-size: .75rem; }
  .role-badge { font-size: .7rem; }
  .main-nav { gap: 0; justify-content: space-between; }
  .main-nav { flex-wrap: wrap; }
  .main-nav a { font-size: .9rem; }
  .main-content { padding-top: 28px; }
  .page-heading { margin-bottom: 22px; }
  .card-grid { gap: 20px; grid-template-columns: minmax(0, 1fr); }
  .card-copy { padding: 16px; }
  .card-title { min-height: 44px; }
  .like-button { font-size: .88rem; }
  .demo-banner { justify-content: flex-start; }
  .demo-banner > span { display: none; }
  .demo-role { gap: 6px; }
  .demo-role label { display: none; }
  .demo-role select { padding: 3px 7px; }
  .demo-role small { font-size: .7rem; }
  .detail-copy { padding: 22px 18px; }
  .detail-image { aspect-ratio: 4/3; }
  .photo-detail { border-radius: 14px; }
  .activity-tabs a { padding: 10px 12px; font-size: .9rem; }
  .list-toolbar { align-items: start; flex-direction: column; }
  .sort-control { align-self: flex-end; }
  .activity-thumb { width: 58px; }
  .login-panel { padding: 22px 18px; }
  .upload-panel { padding: 18px 14px; }
  .upload-item { padding: 12px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* Monthly browsing: the page scrolls vertically; each day has its own photo rail. */
.month-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.month-card { display: block; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; background: #fff; box-shadow: 0 5px 20px #233d3806; }
.month-cover { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.month-copy { position: relative; padding: 20px; }
.month-copy h2 { margin-bottom: 4px; }
.month-copy > span { position: absolute; right: 20px; top: 22px; color: var(--green); font-size: 1.4rem; }
.day-timeline { margin-top: 28px; min-width: 0; }
.day-section { margin-bottom: 40px; min-width: 0; }
.day-section > h2 { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; font-size: 1.1rem; }
.day-section > h2::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #6a8f75; }
.day-rail { display: flex; gap: 20px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; padding: 4px 4px 18px; scrollbar-width: thin; scrollbar-color: #9ab2a1 #edf1ea; }
.day-rail > .photo-card { flex: 0 0 290px; scroll-snap-align: start; }
.day-rail .photo-image { aspect-ratio: 4/3; object-fit: cover; }
.photo-card { position: relative; }
.new-badge { position: absolute; left: 12px; top: 12px; z-index: 1; background: #fff9e9; border: 1px solid #d9c78f; color: #5c4716; padding: 4px 10px; border-radius: 100px; font-size: .76rem; font-weight: 750; box-shadow: 0 2px 8px #0001; pointer-events: none; }
.likers-panel { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.likers-list { list-style: none; padding: 0; margin: 0; }
.likers-list li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.likers-list .muted { margin-bottom: 0; }
.login-form input, .login-form select { min-height: 48px; font-size: 16px; }
.main-nav a { min-width: 0; max-width: 100%; flex-shrink: 1; }
@media (max-width: 680px) {
  .month-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .month-copy { padding: 14px 12px; }
  .month-copy h2 { font-size: 1rem; }
  .month-copy > span { display: none; }
  .day-rail { gap: 14px; }
  .day-rail > .photo-card { flex-basis: min(78vw, 320px); }
  .day-section { margin-bottom: 30px; }
  .main-nav { gap: 4px 22px; font-size: .9rem; }
  .viewer { flex-wrap: wrap; justify-content: flex-end; }
  .new-badge { left: 8px; top: 8px; padding: 3px 8px; }
}
@media (prefers-reduced-motion: reduce) { .day-rail { scroll-behavior: auto; scroll-snap-type: none; } }

.classification-filter { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 18px 0 28px; }
.classification-filter label { font-weight: 650; }
.classification-filter select { min-height: 46px; min-width: 180px; max-width: 100%; background: white; border: 1px solid var(--line); border-radius: 10px; padding: 8px 36px 8px 12px; font-size: 16px; }
.upload-destination { padding: 14px; background: var(--light); border-radius: 10px; font-weight: 650; }

.video-placeholder { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 8px; background: #e7eee7; color: var(--ink); padding: 24px; text-align: center; aspect-ratio: 4/3; }
.photo-link > .video-placeholder { width: 100%; padding: 48px 20px 24px; }
.video-placeholder .muted { font-size: .78rem; max-width: 30ch; margin: 0; }
.video-symbol { font-size: 2rem; line-height: 1; }
.video-caption { color: var(--green); font-weight: 650; font-size: .8rem; margin-bottom: 8px; }
.detail-video { display: block; width: 100%; max-width: 100%; height: auto; max-height: 72vh; object-fit: contain; background: #17251f; border-radius: 16px; }
.detail-video-placeholder { min-height: 260px; border-radius: 16px; }

/* Tabs wrap; horizontal scrolling belongs only to the day photo rails. */
.main-nav { padding-top: 5px; padding-bottom: 5px; }
.main-nav a[aria-current="page"]::after { bottom: 0; }
.main-nav a:focus-visible { outline-offset: -3px; }

.tag-search { width: min(1120px, calc(100% - 48px)); margin: 18px auto 0; }
.tag-search:empty { display: none; }
.tag-search-form, .tag-input-row, .tag-library-search { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.tag-search-form input, .tag-input-row input, .tag-library-search input { flex: 1 1 180px; min-width: 0; min-height: 46px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: white; font-size: 16px; }
.tag-chips { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 8px 0 12px; }
.tag-chips:empty { display: none; }
.tag-chip { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; max-width: 100%; padding: 6px 12px; border: 1px solid #c8d8cd; border-radius: 22px; background: #f1f6ee; color: var(--green); font-size: .85rem; white-space: normal; overflow-wrap: anywhere; }
.tag-chip.selected { background: var(--green); border-color: var(--green); color: white; }
.tag-library { padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fafbf8; }
.upload-form h3 { margin-bottom: 0; font-size: 1rem; }
.search-feedback:empty { display: none; }
@media (max-width: 540px) { .tag-search { width: calc(100% - 32px); } .tag-search-form input { flex-basis: 100%; } }
