/* UNACROSS: a quiet editorial layer around the map. */
:root {
  --cream: #f7f4ee;
  --paper: #fcfaf6;
  --ink: #292925;
  --muted: #625f58;
  --line: #dedbd3;
  --orange: #a65c42;
  --orange-dark: #773f2d;
  --blue: #365c6b;
  --shadow: 0 8px 28px #17171414;
}

body { background: var(--cream); }
.app-shell { background: var(--paper); }
.site-header {
  height: 72px;
  padding-inline: 32px;
  background: var(--paper);
  border-bottom-color: #d7d4cc;
}
.brand { gap: 12px; }
.brand-mark { display: block; width: 34px; height: 34px; flex: none; }
.brand strong { font-size: 21px; font-weight: 600; letter-spacing: .12em; }
.brand small { font-size: 10px; letter-spacing: .16em; }
.tagline { margin-left: 28px; font-size: 16px; letter-spacing: .08em; }
.header-link { font-size: 12px; }
.header-account {
  min-height: 40px;
  border-color: #b7a79b;
  border-radius: 5px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
}
.header-account:hover { background: #ece5d9; }
.mobile-intro { display: none; }

.workspace { isolation: isolate; }
.map-pane { background: #eeede6; }
.story-rail {
  width: clamp(310px, 27vw, 370px);
  flex: none;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 34px 28px 21px;
  background: #f7f4ee;
  border-left: 1px solid #d7d4cc;
}
.workspace.has-selection .story-rail { display: none; }
.story-rail-index,
.story-rail-heading {
  color: var(--orange-dark);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
}
.story-rail-intro { padding-bottom: 27px; border-bottom: 1px solid #d5cfc4; }
.story-rail h1 {
  margin: 18px 0 17px;
  font: 400 clamp(30px, 2.7vw, 40px)/1.5 "Yu Mincho", "Hiragino Mincho ProN", serif;
  letter-spacing: .055em;
}
.story-rail h1 em,
.mobile-intro em { color: var(--orange-dark); font-style: normal; }
.story-rail-intro p {
  max-width: 23em;
  margin: 0;
  font-size: 13px;
  line-height: 1.9;
  color: var(--muted);
}
.story-rail-latest { min-height: 0; overflow: auto; padding: 22px 0; }
.story-rail-heading { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.story-rail-heading a { color: var(--blue); font-size: 11px; letter-spacing: 0; text-decoration: none; }
.story-rail-heading a:hover { text-decoration: underline; }
.story-preview { margin-top: 20px; font-size: 13px; line-height: 1.75; color: var(--muted); }
.story-preview img { display: block; width: 100%; max-height: 154px; object-fit: cover; margin-bottom: 15px; }
.story-preview .story-place { display: block; color: var(--blue); font-size: 11px; font-weight: 700; letter-spacing: .07em; }
.story-preview h2 { margin: 7px 0 9px; color: var(--ink); font: 400 21px/1.45 "Yu Mincho", "Hiragino Mincho ProN", serif; }
.story-preview p { margin: 0 0 10px; }
.story-preview time { display: block; margin-top: 12px; font-size: 11px; }
.story-preview button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 13px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--orange-dark);
  font-size: 12px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.story-preview-empty { padding: 11px 0 2px; }
.story-preview-empty strong { color: var(--ink); font: 400 21px/1.5 "Yu Mincho", "Hiragino Mincho ProN", serif; }
.story-preview-empty p { margin-top: 12px; }
.story-rail-foot { display: flex; gap: 9px; margin-top: auto; padding-top: 14px; border-top: 1px solid #d5cfc4; }
.story-rail-foot p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.story-rail-dot { width: 11px; height: 11px; flex: none; margin-top: 4px; border: 2px solid var(--blue); border-radius: 50%; }

.search-form {
  border-radius: 7px;
  box-shadow: 0 5px 20px #17171420;
}
.search-form button,
.primary-button { border-radius: 5px; }
.quick-filters { gap: 6px; }
.quick-filters button,
.memory-filters button {
  min-height: 44px;
  padding-inline: 14px;
  border-radius: 5px;
  box-shadow: 0 3px 10px #17171413;
}
.quick-filters .official-filter { border-radius: 5px; }
.filter-hint { display: none; }
.search-results { border-radius: 7px; box-shadow: 0 8px 24px #17171424; }
.result-item { border-radius: 3px; }
.map-prompt {
  left: 18px;
  bottom: 17px;
  display: flex;
  align-items: center;
  gap: 11px;
  max-width: 330px;
  padding: 10px 13px;
  transform: none;
  border-radius: 4px;
  white-space: normal;
  line-height: 1.4;
  box-shadow: 0 2px 10px #17171410;
}
.pin-gesture-mark { display: grid; place-items: center; width: 29px; height: 29px; flex: none; border: 1px solid var(--orange); border-radius: 50%; color: var(--orange-dark); font-size: 20px; font-weight: 400; }
.map-prompt strong { display: block; color: var(--ink); font-size: 12px; font-weight: 700; }
.map-prompt small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.prompt-touch { display: none !important; }
@media (pointer: coarse) { .prompt-touch { display: block !important; } .prompt-mouse { display: none !important; } }
.map-tools { right: 18px; bottom: 17px; }
.map-tools button { border-radius: 5px; box-shadow: 0 4px 16px #17171420; }
.site-footer { background: var(--paper); border-top-color: #d7d4cc; }
.site-footer span:first-child { display: none; }
.site-footer a[href="admin.html"] { display: none; }

.side-pane { width: min(430px, 37vw); background: var(--paper); box-shadow: -5px 0 24px #17171416; }
.sheet-top { height: 43px; }
.icon-button { min-width: 44px; min-height: 44px; }
.sheet-scroll { padding: 22px 27px 35px; }
.section-kicker { color: var(--orange-dark); letter-spacing: .08em; }
.selection-heading h1 { font-weight: 400; font-size: 29px; }
.selection-description { font-size: 13px; }
.write-button {
  width: auto;
  min-height: 44px;
  margin: 0 0 18px;
  padding: 0;
  justify-content: flex-start;
  gap: 8px;
  border: 0;
  border-radius: 0;
  background: none;
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.write-button:hover { background: none; color: var(--orange); }
.official-section { margin-top: 2px; border: 1px solid #b9c9ca; border-radius: 5px; background: #f5f8f7; }
.official-badge { display: block; padding: 0; border-radius: 0; background: none; color: var(--blue); font-size: 11px; }
.official-section img { border-radius: 2px; }
.official-credit { margin-top: 14px; border-top: 1px solid #b5cbd0; }
.official-credit summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-weight: 700; }
.official-credit p { margin: 0 0 9px; }
.memory-card { border-color: #ded8cc; border-radius: 5px; background: #fcfaf6; box-shadow: none; }
.memory-card h3 { font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-weight: 400; font-size: 20px; }
.memory-photos img { border-radius: 2px; }
.photo-picker .photo-file-input { position: absolute; width: 1px; height: 1px; padding: 0; border: 0; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
.photo-picker .photo-add-button { display: inline-flex; align-items: center; justify-content: center; width: auto; min-height: 44px; margin: 1px 0 0; padding: 0 15px; border: 1px solid var(--orange); border-radius: 4px; background: var(--paper); color: var(--orange-dark); font-size: 12px; font-weight: 700; cursor: pointer; }
.photo-file-input:focus-visible + .photo-add-button { outline: 3px solid var(--blue); outline-offset: 2px; }
.photo-picker #photo-count { margin: 9px 0 0; color: var(--muted); }
.report-row { justify-content: flex-end; margin-top: 4px; }
.report-row button { min-width: 68px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.report-row + .minor-message:empty { display: none; }
.report-dialog { width: min(430px, calc(100vw - 30px)); padding: 27px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper); color: var(--ink); box-shadow: 0 22px 70px #17171438; }
.report-dialog::backdrop { background: #2525208c; }
.report-dialog h2 { margin: 10px 0 13px; font: 400 27px/1.45 "Yu Mincho", "Hiragino Mincho ProN", serif; }
.report-dialog form > p:not(.section-kicker) { color: var(--muted); font-size: 13px; line-height: 1.7; }
.report-dialog label { display: block; margin-top: 20px; font-size: 12px; font-weight: 700; }
.report-dialog select { display: block; width: 100%; min-height: 48px; margin-top: 8px; padding-inline: 12px; border-radius: 4px; background: #fff; font-size: 15px; }
.report-dialog .dialog-actions { margin-top: 24px; }
.report-dialog .dialog-actions button { min-height: 44px; border-radius: 4px; }

.feed-section { scroll-margin-top: 12px; padding-block: 58px 74px; background: #f2f0ea; }
.feed-inner { max-width: 1100px; }
.feed-section h2,
.features-section h2 { font-weight: 400; letter-spacing: .04em; }
.feed-list { gap: 18px; }
.feed-list .memory-card { padding: 23px; }
.feed-list .memory-body { font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: 16px; line-height: 1.85; }
.features-section { background: var(--paper); }
.features-grid { display: block; max-width: 900px; margin-top: 36px; }
.features-grid .feature-card {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 18px;
  padding: 25px 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: none;
  box-shadow: none;
}
.features-grid .feature-card:last-child { border-bottom: 1px solid var(--line); }
.features-grid .feature-number,
.features-grid .feature-card:nth-child(2) .feature-number {
  display: block;
  width: auto;
  height: auto;
  border-radius: 0;
  background: none;
  color: var(--orange-dark);
  font: 400 18px/1.5 "Yu Mincho", "Hiragino Mincho ProN", serif;
}
.features-grid .feature-card h3 { margin: 0 0 8px; font: 400 22px/1.5 "Yu Mincho", "Hiragino Mincho ProN", serif; }
.features-grid .feature-card p { max-width: 57em; line-height: 1.9; }
.features-actions { margin-top: 31px; }
.features-album { margin: 23px 0 0; color: var(--muted); font-size: 13px; }

@media (max-width: 980px) and (min-width: 761px) {
  .story-rail { width: 300px; padding-inline: 20px; }
  .tagline { display: none; }
  .search-form { max-width: 520px; }
}

@media (max-width: 760px) {
  .app-shell { height: auto; min-height: 0; overflow: visible; }
  .site-header { height: 56px; padding-inline: 15px; }
  .brand-mark { width: 28px; height: 28px; }
  .brand strong { font-size: 18px; }
  .header-account { min-height: 38px; border-radius: 4px; }
  .mobile-intro {
    display: block;
    padding: 13px 17px 11px;
    border-bottom: 1px solid var(--line);
    background: var(--paper);
  }
  .mobile-intro p { margin: 0 0 4px; font: 400 21px/1.35 "Yu Mincho", "Hiragino Mincho ProN", serif; letter-spacing: .035em; }
  .mobile-intro span { color: var(--muted); font-size: 10px; line-height: 1.5; }
  .workspace { display: block; flex: none; height: clamp(365px, 59svh, 560px); min-height: 0; }
  .story-rail { display: none; }
  .map-pane { inset: 0; }
  .map-overlay { top: 9px; left: 9px; right: 9px; }
  .search-form { height: 48px; border-radius: 5px; }
  .search-form button { min-height: 44px; }
  .quick-filters { padding-top: 7px; padding-bottom: 3px; }
  .quick-filters button,
  .memory-filters button { min-height: 44px; border-radius: 4px; font-size: 11px; }
  .filter-hint { display: block; width: max-content; margin: 0 0 0 auto; color: var(--muted); font-size: 10px; line-height: 1.2; }
  .filter-hint span { color: var(--orange-dark); }
  .memory-filters { padding-top: 3px; }
  .search-results { max-height: 46dvh; }
  .map-tools { right: 9px; bottom: 45px; }
  .map-tools .map-style-toggle { min-height: 44px; }
  .map-prompt { left: 9px; bottom: 91px; max-width: min(270px, calc(100% - 90px)); padding: 8px 9px; text-align: left; }
  .prompt-touch { display: block !important; }
  .prompt-mouse { display: none !important; }
  .map-prompt strong { font-size: 11px; }
  .map-prompt small { font-size: 9px; }
  .pin-gesture-mark { width: 26px; height: 26px; font-size: 18px; }
  .side-pane {
    width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 13px 13px 0 0;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .side-pane[data-sheet=peek] { height: min(59%, 320px); }
  .side-pane[data-sheet=collapsed] { height: 168px; }
  .side-pane[data-sheet=expanded] { height: 100%; }
  .sheet-top { height: 40px; }
  .sheet-scroll { padding: 11px 17px 25px; }
  .selection-heading h1 { font-size: 23px; }
  .selection-description { margin-bottom: 8px; }
  .write-button { margin-bottom: 11px; }
  .site-footer { height: 35px; padding-inline: 12px; }
  .feed-section { padding: 34px 17px 52px; }
  .feed-list { grid-template-columns: 1fr; }
  .memory-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 12px; }
  .memory-actions .memory-detail-button { justify-self: start; padding-left: 0; }
  .features-section { padding: 45px 18px 55px; }
  .features-grid .feature-card { grid-template-columns: 37px minmax(0, 1fr); gap: 10px; padding: 22px 0; }
  .features-grid .feature-card h3 { font-size: 19px; }
  .features-grid .feature-card p { grid-column: 2; }
  .features-actions .primary-button { width: auto; }
}

@media (max-width: 360px) {
  .mobile-intro p { font-size: 19px; }
  .mobile-intro span { font-size: 9px; }
  .workspace { height: clamp(350px, 58svh, 500px); }
  .map-prompt { max-width: calc(100% - 125px); }
}

/* The same visual voice carries into the account and community pages. */
.album-body,
.social-body,
.place-page { background: #f7f4ee; }
.guide-body { background: var(--paper); color: var(--ink); }
.guide-header { min-height: 72px; display: flex; align-items: center; justify-content: space-between; padding: 0 max(25px, calc((100vw - 1060px)/2)); border-bottom: 1px solid var(--line); }
.guide-header > a:last-child { color: var(--blue); font-size: 12px; }
.guide-main { max-width: 850px; margin: 0 auto; padding: 65px 28px 110px; }
.guide-main h1 { margin: 9px 0 48px; font: 400 clamp(31px, 4vw, 45px)/1.4 "Yu Mincho", "Hiragino Mincho ProN", serif; letter-spacing: .045em; }
.guide-content h2 { margin: 40px 0 17px; padding-top: 30px; border-top: 1px solid var(--line); font: 400 23px/1.5 "Yu Mincho", "Hiragino Mincho ProN", serif; }
.guide-content p { margin: 0 0 17px; color: #47443e; font-size: 14px; line-height: 2; }
.album-header,
.social-header,
.place-header { background: var(--paper); border-bottom-color: #d7d4cc; }
.album-body .brand-mark,
.social-body .brand-mark,
.place-page .brand-mark { width: 34px; height: 34px; }
.auth-card,
.album-panel,
.album-summary,
.album-stats,
.social-panel,
.profile-hero,
.profile-stats {
  border-color: var(--line);
  border-radius: 6px;
  background: var(--paper);
  box-shadow: 0 6px 24px #1717140b;
}
.album-memory,
.liked-memory,
.social-memory { border-radius: 4px; background: var(--paper); }
.album-gallery figure { box-shadow: 0 3px 12px #17171414; }
.social-nav a,
.social-panel button,
.social-actions button,
.social-primary { border-radius: 5px; }
@media (max-width: 760px) {
  .album-body .brand-mark,
  .social-body .brand-mark,
  .place-page .brand-mark { width: 28px; height: 28px; }
  .guide-header { min-height: 56px; padding-inline: 15px; }
  .guide-main { padding: 42px 18px 80px; }
  .guide-main h1 { margin-bottom: 30px; }
  .guide-content h2 { font-size: 21px; }
}
@media (max-width: 640px) {
  .feed-list .memory-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
  .feed-list .memory-actions .like-control { grid-column: 1 / -1; }
  .feed-list .memory-actions .memory-detail-button { justify-self: stretch; width: 100%; min-width: 0; min-height: 44px; padding: 5px 2px; border: 1px solid #d8c8b6; border-radius: 7px; background: #fffdf9; color: var(--blue); font-size: 12px; text-decoration: none; white-space: normal; }
}
.memory-actions a.memory-detail-button { display: inline-flex; align-items: center; justify-content: center; }
