@charset "UTF-8";

/* Source: docs/references/cyworld-asiae.jpg, classic PC default skin. */
:root {
  --canvas: #a5a5a5;
  --grid: #969696;
  --cover: #e6e6e6;
  --cover-line: #777;
  --sheet: #eee;
  --paper: #fff;
  --ink: #444;
  --muted: #888;
  --line: #d2d2d2;
  --blue: #248ca5;
  --accent: #ee5d53;
  --selected: #238da8;
  --soft: #edf6f8;
  font: 12px "돋움", Dotum, "Apple SD Gothic Neo", sans-serif;
  color: var(--ink);
  font-synthesis: none;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-width: 280px;
  min-height: 100vh;
  background: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px), var(--canvas);
  background-size: 12px 12px;
}
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, textarea, select { font: inherit; color: inherit; border-radius: 0; }
button, a, input, select { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: default; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid #155e85;
  outline-offset: 2px;
}
p, h1, h2, h3 { margin: 0; }
img { display: block; max-width: 100%; }
svg { flex-shrink: 0; }
.icon { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.symbol-library, .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 12px; top: -60px; z-index: 30; padding: 12px; background: white; }
.skip-link:focus { top: 12px; }
.desktop { width: 808px; max-width: calc(100% - 132px); margin: 64px auto 28px; }
.stage { display: block; }
.notebook {
  position: relative;
  width: 100%;
  height: 544px;
  padding: 18px;
  border: 1px solid var(--cover-line);
  border-radius: 9px;
  background: var(--cover);
  box-shadow: 1px 1px 2px #0003, inset 0 0 0 2px #fff8;
}
.notebook-stitch { position: absolute; inset: 11px; border: 1px dashed #969696; border-radius: 6px; pointer-events: none; }
.notebook:before, .notebook:after { content: ""; position: absolute; z-index: 1; width: 24px; height: 5px; left: 217px; background: var(--cover); }
.notebook:before { top: -1px; border-bottom: 1px solid #999; clip-path: polygon(0 0, 50% 75%, 100% 0, 100% 100%, 0 100%); }
.notebook:after { bottom: -1px; border-top: 1px solid #999; clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 25%, 0 100%); }
.paper { height: 100%; padding: 9px 9px 7px; background: var(--sheet); border: 1px solid #fff; border-radius: 7px; position: relative; }
.home-header { display: grid; grid-template-columns: 194px minmax(0, 1fr); align-items: center; gap: 12px; height: 28px; margin-bottom: 4px; }
.visit-counter { display: flex; justify-content: center; align-items: center; gap: 5px; font: 9px Tahoma, sans-serif; white-space: nowrap; color: #444; }
.visit-counter b { color: #ed4938; font-weight: normal; }
.visit-counter span:last-child b { color: #333; }
.visit-counter i { height: 7px; width: 1px; margin: 0 2px; background: #a6a6a6; }
.home-title { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; min-width: 0; padding-left: 5px; }
.home-title h1 { font-size: 16px; color: #388393; letter-spacing: -1px; white-space: nowrap; }
.home-address { color: #555; font: 9px Tahoma, sans-serif; white-space: nowrap; }
.paper-grid { display: grid; grid-template-columns: 194px minmax(0, 1fr); gap: 12px; height: calc(100% - 32px); min-height: 0; }
.profile-panel { display: flex; flex-direction: column; min-height: 0; padding: 17px 17px 14px; border: 1px solid #aaa; border-radius: 7px; background: white; }
.mood-control { display: flex; align-items: center; height: 24px; min-height: 24px; padding: 0 5px; gap: 4px; border: 1px solid #ddd; margin-bottom: 7px; }
.mood-control > span:first-child { font: bold 8px Verdana, sans-serif; color: #2097b1; white-space: nowrap; }
.mood-dot { width: 10px; height: 10px; border-radius: 50%; background: #f68b95; border: 1px solid #ca6271; }
.mood-control select { border: 0; background: transparent; font-size: 11px; width: 100%; min-width: 0; padding: 0; }
.profile-photo { height: 133px; flex-shrink: 0; border: 1px solid #e4e4e4; display: flex; justify-content: center; align-items: flex-start; background: #fff; overflow: hidden; }
.profile-photo img { width: 146px; height: 219px; max-width: none; flex-shrink: 0; object-fit: contain; image-rendering: pixelated; margin: 0; }
.profile-intro { padding: 22px 0 12px; font-size: 12px; line-height: 1.65; color: #358795; overflow-wrap: anywhere; overflow-y: auto; }
.profile-intro p { white-space: pre-line; }
.profile-bottom { margin-top: auto; }
.profile-tools { display: flex; align-items: center; gap: 7px; border-bottom: 1px solid #ddd; padding: 4px 0; margin-bottom: 20px; font: 8px Verdana, sans-serif; color: #333; }
.profile-tools span { color: #238da8; font-size: 8px; }
.text-button { border: 0; background: none; padding: 0; font: inherit; display: inline-flex; align-items: center; gap: 2px; }
.profile-identity { display: flex; flex-direction: column; gap: 3px; margin-bottom: 14px; }
.profile-identity strong { color: #356b89; font-size: 12px; }
.tiny-heart { color: #e8838c; font-size: 10px; }
.profile-identity > span { color: #d48b22; font: 10px Tahoma, sans-serif; }
.shortcut-label { display: block; }
.shortcut-label select { width: 100%; height: 22px; font-size: 11px; border: 1px solid #bfbfbf; background: #fff; }
.binder { position: absolute; left: 198px; z-index: 4; width: 18px; height: 6px; border: 1px solid #969696; border-radius: 5px; background: linear-gradient(#fefefe, #ccc 50%, #f8f8f8); box-shadow: 0 1px 1px #7773; }
.binder:after { content: ""; position: absolute; top: 21px; left: -1px; width: 18px; height: 6px; border: 1px solid #969696; border-radius: 5px; background: inherit; }
.binder-one { top: 100px; }
.binder-two { bottom: 104px; }
.content-panel { min-width: 0; min-height: 0; height: 100%; padding: 12px 13px; border: 1px solid #aaa; border-radius: 7px; background: #fff; overflow-y: scroll; overflow-x: hidden; scrollbar-color: #ccc #f1f1f1; scrollbar-width: auto; scrollbar-gutter: stable; }
.content-panel::-webkit-scrollbar { width: 13px; }
.content-panel::-webkit-scrollbar-track { background: #f0f0f0; border-left: 1px solid #ddd; }
.content-panel::-webkit-scrollbar-thumb { border: 2px solid #f0f0f0; background: #ccc; }
.content-panel::-webkit-scrollbar-button:single-button { display: block; height: 12px; background: #ddd; border: 1px solid #eee; }
.bookmarks { position: absolute; top: 65px; right: -49px; width: 57px; display: flex; flex-direction: column; gap: 3px; z-index: 5; }
.bookmarks a { min-height: 32px; display: flex; justify-content: center; align-items: center; color: white; font-size: 12px; letter-spacing: -1px; background: var(--selected); border: 1px solid #276977; border-radius: 0 5px 5px 0; box-shadow: inset 0 1px 0 #ffffff50; }
.bookmarks a:hover { background: #16758b; text-decoration: none; }
.bookmarks a[aria-current="page"] { color: #333; background: white; border-left-color: white; }
.nav-dot { margin-left: 4px; width: 4px; height: 4px; background: #f5ab37; border-radius: 50%; }
.nav-dot[hidden] { display: none; }
.mobile-nav { display: none; }
.section-heading { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #ccc; min-height: 19px; padding-bottom: 3px; margin-bottom: 5px; gap: 6px; }
.section-heading h2 { color: var(--blue); font: bold 12px Tahoma, "돋움", Dotum, sans-serif; }
.section-heading > a { color: #888; font-size: 10px; }
.recent-news { display: grid; grid-template-columns: minmax(0, 1fr) 180px; gap: 10px; margin-bottom: 11px; }
.news-list { list-style: none; padding: 0; margin: 0; font-size: 11px; }
.news-list li + li { margin-top: 3px; }
.news-list a { display: flex; gap: 4px; align-items: center; min-width: 0; }
.news-badge { background: #e99292; color: white; font-size: 9px; padding: 1px 2px; flex-shrink: 0; }
.news-badge.diary { background: #88b5c7; }
.news-name { white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.news-counts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; font-size: 11px; color: #777; }
.news-counts a { padding: 5px 0 6px; border-bottom: 1px dashed #ccc; white-space: nowrap; }
.news-counts b { font: 10px Tahoma, sans-serif; color: #1d62a2; }
.room-heading { margin-bottom: 0; border-bottom: 0; }
.room-heading h2 { display: flex; align-items: center; gap: 5px; font-size: 11px; }
.room-heading h2 > span { font-weight: normal; color: #999; }
.room-heading h2 > b { font-size: 11px; }
.room-heading h2 > span + b, .room-heading h2 > b + span { border-left: 1px solid #ccc; padding-left: 5px; }
.room-expand { display: inline-flex; align-items: center; gap: 3px; padding: 2px 0; font-size: 9px; color: #888; border: 0; background: none; }
.room-expand .icon { width: 10px; height: 10px; }
.room-art { width: 100%; aspect-ratio: 2.1; border: 1px solid #d4d4d4; overflow: hidden; position: relative; background: #f5e8e5; }
.room-art .room-avatar { position: absolute; width: 40px; height: 60px; object-fit: contain; image-rendering: pixelated; bottom: 12%; left: 40%;  }
.room-caption { display: flex; justify-content: space-between; align-items: center; font-size: 9px; color: #888; height: 19px; border-bottom: 1px solid #ddd; }
.room-caption > span:last-child { background: #eee; border: 1px solid #d4d4d4; font-size: 8px; padding: 1px 3px; }
.greeting-heading { margin-top: 9px; }
.greeting-preview { border-bottom: 1px dashed #ccc; font-size: 10px; line-height: 1.7; padding: 5px 0; overflow-wrap: anywhere; color: #777; }
.greeting-preview > a { display: none; }
.guest-name { color: #22799a; margin-right: 7px; }
.desktop-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 9px; color: #353535; margin: 12px 2px 0; line-height: 1.8; }
.theme-widget { display: flex; align-items: center; gap: 5px; }
.theme-widget h2 { font-size: 10px; font-weight: normal; }
.theme-choices { display: flex; align-items: center; gap: 5px; }
.theme-choice { width: 18px; height: 18px; min-width: 18px; padding: 0; border: 1px solid #555; box-shadow: inset 0 0 0 2px #fff; }
.theme-choice.sky { background: #e6e6e6; }
.theme-choice.rose { background: #ead5da; }
.theme-choice[aria-pressed="true"] { outline: 1px solid #fff; outline-offset: 1px; }
.theme-choices > span { margin-left: 3px; }
body[data-theme="rose"] { --cover: #ead5da; --cover-line: #a1868d; --sheet: #f4eeee; }
.page-heading{display:flex;justify-content:space-between;align-items:baseline;padding-bottom:12px;border-bottom:1px solid var(--line);margin-bottom:22px;gap:12px}
.page-heading h2{font-size:16px;letter-spacing:-.5px;color:var(--blue)}
.page-heading>span{font-size:10px;color:var(--muted)}
.page-intro{font-size:12px;color:var(--muted);line-height:1.8;margin-bottom:23px}
.primary-button,.secondary-button{padding:10px 18px;border:1px solid var(--selected);background:var(--selected);color:#fff;min-height:38px;font-size:12px;border-radius:4px}
.primary-button:hover{filter:brightness(.93)}
.secondary-button{background:white;color:var(--muted);border-color:var(--line)}
.guest-form{padding:15px;background:#f3f5f0;border:1px solid #e0e5da;margin-bottom:23px}
.guest-form label{font-size:11px;display:block;margin-bottom:6px}
.guest-form input,.guest-form textarea,.editor-dialog textarea{width:100%;border:1px solid #cbd4c6;background:white;padding:9px;color:var(--ink);line-height:1.7}
.guest-form input{max-width:185px;height:34px;margin-bottom:12px}
.guest-form textarea{height:91px;resize:vertical;min-height:65px}
.guest-form .form-actions{display:flex;align-items:center;justify-content:space-between;margin-top:8px;gap:10px}
.char-count{font:10px monospace;color:var(--muted)}
.guest-form .primary-button{min-height:34px;padding:7px 12px;font-size:11px}
.storage-hint{font-size:10px;color:#7a8674;line-height:1.8;margin:10px 0 0}
.form-error{font-size:11px;color:#a64232;margin-top:8px}
.guest-list{padding:0;margin:0;list-style:none}
.guest-entry{border-top:1px dashed var(--line);padding:15px 0;display:grid;grid-template-columns:38px minmax(0,1fr);gap:12px}
.guest-entry>img{width:26px;height:35px;image-rendering:pixelated;margin:0 auto}
.guest-entry header{display:flex;justify-content:space-between;gap:10px;align-items:center;margin-bottom:7px}
.guest-entry strong{font-size:11px;color:var(--blue);overflow-wrap:anywhere}
.guest-entry time{font:9px monospace;color:var(--muted);white-space:nowrap}
.guest-entry p{font-size:12px;line-height:1.9;overflow-wrap:anywhere;white-space:pre-line}
.empty-guests{text-align:center;padding:28px 8px 18px;color:var(--muted)}
.empty-guests .icon{width:20px;height:20px;margin-bottom:10px;color:#aaa38c}
.empty-guests p{font-size:12px;line-height:1.9}
.empty-guests small{display:block;font-size:10px;margin-top:5px;color:#90988a}
.dialog-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:22px;gap:16px}
.dialog-heading h2{font-size:17px;color:var(--blue);font-weight:400}
.icon-button{background:none;border:0;min-width:40px;min-height:40px;display:flex;align-items:center;justify-content:center}
.icon-button .icon{width:20px;height:20px}
dialog{border:1px solid #8aa29a;padding:24px;border-radius:8px;color:var(--ink);box-shadow:0 14px 60px #25342f33;max-width:calc(100vw - 32px);overscroll-behavior:contain}
dialog::backdrop{background:#25372f66;backdrop-filter:blur(3px)}
.editor-dialog{width:420px}
.editor-dialog label{display:block;font-size:12px;margin-bottom:8px}
.editor-dialog textarea{resize:vertical;min-height:110px}
.field-hint{font-size:11px;color:var(--muted);line-height:1.8;margin-top:8px}
.dialog-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:25px}
.image-dialog{width:min(1000px,calc(100vw - 40px));background:#f9f7ef;padding:28px 20px 15px;overflow:visible}
.image-dialog>.icon-button{position:absolute;right:7px;top:3px;background:#f9f7efc9;border-radius:50%}
.image-dialog>img{width:100%;height:auto;max-height:calc(100dvh - 145px);object-fit:contain}
.image-dialog>p{text-align:center;line-height:1.8;padding-top:13px;font-size:12px;color:var(--blue)}
body:has(dialog[open]){overflow:hidden}
.toast{position:fixed;bottom:28px;left:50%;transform:translate(-50%,10px);opacity:0;pointer-events:none;background:#425d54;color:white;font-size:12px;line-height:1.7;padding:11px 20px;border:1px solid #344c43;border-radius:6px;max-width:calc(100vw - 36px);width:max-content;z-index:30;transition:opacity .16s,transform .16s}
.toast.visible{opacity:1;transform:translate(-50%,0)}
.noscript-note{position:fixed;bottom:5px;background:white;padding:12px}

/* The remaining pages share the original small type, square controls and thin rules. */
.page-heading { padding-bottom: 6px; margin-bottom: 14px; }
.page-heading h2 { font: bold 12px Tahoma, sans-serif; letter-spacing: 0; }
.page-heading > span { font-size: 10px; }
.page-intro { font-size: 11px; margin-bottom: 16px; }
.primary-button, .secondary-button { min-height: 25px; padding: 4px 9px; font-size: 11px; background: #f7f7f7; border: 1px solid #aaa; color: #555; border-radius: 0; box-shadow: inset 0 1px 0 white; }
.primary-button:hover, .secondary-button:hover { background: #e9f2f5; filter: none; }
.guest-form { background: #f5f5f5; border-color: #ddd; padding: 10px; margin-bottom: 15px; }
.guest-form input, .guest-form textarea, .editor-dialog textarea { border-color: #bbb; padding: 5px; }
.guest-form input { height: 27px; margin-bottom: 8px; }
.guest-form textarea { height: 65px; }
.guest-form .primary-button { min-height: 27px; padding: 4px 9px; }
.storage-hint { font-size: 10px; color: #888; }
.quick-guest-form { padding: 4px 0 0; margin: 0; background: none; border: 0; }
.quick-guest-fields { display: flex; align-items: center; gap: 4px; }
.quick-guest-title { color: #777; font-size: 10px; white-space: nowrap; }
.quick-guest-form input { width: 0; min-width: 0; height: 22px; padding: 3px; margin: 0; font-size: 10px; background: #fafafa; }
.quick-guest-form #guest-name { width: 52px; flex-shrink: 0; }
.quick-guest-form #guest-message { flex: 1; max-width: none; }
.quick-guest-form .primary-button { min-height: 22px; height: 22px; padding: 2px 6px; font-size: 10px; white-space: nowrap; }
.quick-guest-form .storage-hint { margin-top: 3px; }
.quick-guest-form .form-error { font-size: 10px; }
.guest-entry { padding: 12px 0; }
.guest-entry p { font-size: 11px; }
.empty-guests { padding: 20px 5px; }
dialog { border-color: #777; border-radius: 3px; }
dialog::backdrop { background: #3337; backdrop-filter: none; }
.editor-dialog { font-size: 12px; }
.dialog-heading h2 { font-size: 14px; font-weight: bold; }
.image-dialog { background: #fff; }
.image-dialog > .icon-button { background: #fffd; }
.toast { background: #fff; color: #333; border-color: #777; border-radius: 2px; box-shadow: 2px 2px 0 #0002; }

/* Detail panes follow the archived Photo / Guest book screens in docs/references. */
[hidden] { display: none !important; }
#home-profile { display: flex; flex-direction: column; min-height: 0; height: 100%; }
.section-panel { padding: 14px 13px; }
#section-sidebar { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.sidebar-title { color: #26849b; font: bold 13px Tahoma, sans-serif; border-bottom: 2px solid #5d9aac; padding: 0 3px 6px; margin-bottom: 10px; }
.sidebar-tree { font-size: 11px; line-height: 1.9; }
.sidebar-tree a { display: block; padding: 3px 4px; overflow-wrap: anywhere; }
.sidebar-tree a[aria-current] { color: #197895; font-weight: bold; background: #eff5f6; }
.tree-root:before, .sidebar-tree summary:before { content: ''; display: inline-block; width: 10px; height: 7px; background: #f3d688; border: 1px solid #c4aa69; margin-right: 5px; box-shadow: 0 -2px 0 -1px #c4aa69; }
.sidebar-tree details { margin-top: 7px; }
.sidebar-tree summary { cursor: pointer; padding: 3px 4px; list-style: none; }
.sidebar-tree summary:after { content: '+'; float: right; color: #999; font: 10px Tahoma, sans-serif; }
.sidebar-tree details[open] > summary:after { content: '−'; }
.sidebar-tree .tree-child { margin-left: 9px; padding-left: 16px; position: relative; border-left: 1px dotted #bbb; }
.tree-child:before { content: ''; width: 9px; border-top: 1px dotted #bbb; position: absolute; left: 0; top: 13px; }
.sidebar-tree .tree-root { margin-top: 4px; }
.sidebar-tree .tree-top { color: #555; }
.sidebar-tree small { font: 9px Tahoma, sans-serif; color: #999; font-weight: normal; }
.sidebar-note { color: #888; font-size: 10px; line-height: 1.8; border-top: 1px solid #ddd; padding: 9px 3px 0; margin-top: auto; }
.sidebar-bottom { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; justify-content: space-between; margin-top: auto; border-top: 1px solid #ccc; padding-top: 7px; font-size: 10px; color: #888; }
.mini-button { border: 1px solid #bbb; background: #f8f8f8; color: #666; font-size: 10px; line-height: 1.4; padding: 2px 5px; box-shadow: inset 0 1px white; white-space: nowrap; }
.classic-section-head { display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px solid #bbb; min-height: 23px; padding: 2px 1px 5px; margin-bottom: 9px; }
.classic-section-head h2 { color: #26849b; font-size: 12px; }
.classic-section-head > span { font-size: 10px; color: #888; }
.profile-subtabs { display: flex; border-bottom: 1px solid #bbb; gap: 2px; padding-left: 5px; margin-bottom: 19px; }
.profile-subtabs a { border: 1px solid #ccc; border-bottom: 0; background: #eee; padding: 5px 13px 4px; font-size: 11px; }
.profile-subtabs a[aria-current] { background: white; color: #24859a; font-weight: bold; position: relative; top: 1px; padding-top: 4px; }
.classic-profile { padding: 0 7px; font-size: 12px; }
.profile-nameplate { display: flex; align-items: center; gap: 18px; padding: 5px 12px 19px; }
.profile-nameplate img { width: 46px; height: 70px; image-rendering: pixelated; }
.profile-nameplate strong { display: block; font-size: 13px; color: #347a90; margin-bottom: 9px; }
.profile-nameplate span { font-size: 11px; line-height: 1.7; }
.dotted-title { font-size: 11px; color: #37859a; padding: 7px 3px; border-bottom: 1px dotted #aaa; }
.profile-about { white-space: pre-line; line-height: 1.9; padding: 17px 10px 22px; overflow-wrap: anywhere; }
.classic-info { margin: 0; font-size: 11px; border-top: 1px solid #ddd; }
.classic-info > div { display: grid; grid-template-columns: 85px minmax(0, 1fr); border-bottom: 1px solid #e5e5e5; }
.classic-info dt { padding: 10px 8px; color: #888; background: #f8f8f8; }
.classic-info dd { margin: 0; padding: 10px 12px; line-height: 1.6; overflow-wrap: anywhere; }
.classic-edit-line { display: flex; justify-content: flex-end; margin-top: 10px; color: #45849b; font-size: 10px; }
.classic-edit-line .icon { width: 10px; height: 10px; }
.content-footnote { margin-top: 12px; font-size: 10px; color: #888; }
.side-month { display: flex; align-items: center; justify-content: space-between; padding: 1px 8px 9px; font: 11px Tahoma, sans-serif; }
.side-month a { color: #888; font-size: 9px; padding: 3px; }
.side-calendar { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); text-align: center; font: 10px Tahoma, sans-serif; gap: 2px 0; padding-bottom: 13px; border-bottom: 1px solid #ddd; }
.side-calendar > * { min-height: 19px; display: flex; justify-content: center; align-items: center; }
.side-calendar .weekday { color: #999; }
.side-calendar .weekday-0 { color: #e26464; }
.side-calendar .weekday-6 { color: #4f8db4; }
.side-calendar a { color: #888; }
.side-calendar .has-entry { color: #31869b; font-weight: bold; text-decoration: underline; }
.side-calendar a[aria-current] { background: #2d8da5; color: white; }
.diary-folders { padding: 8px 0 12px; }
.diary-date-strip { display: flex; align-items: center; gap: 13px; border: 1px solid #ccc; padding: 10px 10px; margin-bottom: 15px; }
.diary-date-strip > strong { text-align: center; color: #3a8ba0; font: 10px Tahoma, sans-serif; border-right: 1px solid #ddd; padding-right: 12px; }
.diary-date-strip > strong b { font-size: 20px; line-height: 1.3; }
.diary-days { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 1px; }
.diary-days button { background: none; border: 1px solid transparent; padding: 2px; min-width: 18px; height: 20px; font: 10px Tahoma, sans-serif; color: #666; }
.diary-days .sunday { color: #d95b5b; }
.diary-days .saturday { color: #498cbd; }
.diary-days .has-entry { text-decoration: underline; font-weight: bold; }
.diary-days [aria-pressed="true"] { color: white; background: #298aa2; border-color: #298aa2; }
.classic-diary-entry { border: 1px solid #ddd; padding: 15px 16px 10px; min-height: 285px; }
.diary-entry-date { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; justify-content: space-between; margin-bottom: 23px; font-size: 10px; color: #999; }
.diary-entry-date time { font-weight: bold; color: #33869e; }
.classic-diary-entry h3 { font-size: 12px; font-weight: normal; margin-bottom: 19px; }
.classic-diary-entry > p { font-size: 12px; white-space: pre-line; line-height: 1.9; overflow-wrap: anywhere; }
.classic-diary-entry .post-bottom { margin-top: 30px; }
.diary-bottom-nav { display: flex; justify-content: space-between; font-size: 10px; color: #888; margin-top: 10px; }
.diary-bottom-nav a { color: #377a90; }
.empty-day { font-size: 11px; color: #888; padding: 55px 2px; line-height: 1.9; text-align: center; }
.album-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px; font-size: 10px; color: #999; margin: 0 1px 13px; }
.album-toolbar a[aria-current] { color: #555; font-weight: bold; }
.photo-post { margin-bottom: 28px; }
.photo-post-title { font-size: 12px; font-weight: normal; text-align: center; background: #eee; border-top: 1px solid #ddd; border-bottom: 1px solid #ddd; padding: 8px 5px; line-height: 1.5; }
.photo-post-meta { display: flex; align-items: center; gap: 9px; font: 9px Tahoma, sans-serif; color: #999; margin: 7px 1px 12px; }
.post-author { color: #397791; font-size: 11px; }
.photo-post-meta .mini-button { margin-left: auto; }
.photo-original { display: block; border: 0; background: white; padding: 0; width: 100%; }
.photo-original img { width: 100%; height: auto; }
.photo-original:hover { opacity: .94; }
.photo-description { font-size: 11px; line-height: 1.8; padding: 20px 2px 23px; color: #555; }
.post-bottom { display: flex; justify-content: space-between; align-items: center; gap: 8px; color: #888; font-size: 10px; border-top: 1px dotted #ccc; padding-top: 7px; }
.post-bottom a { color: #408399; }
.photo-social { display: flex; align-items: center; gap: 10px; margin-top: 9px; font-size: 11px; color: #777; }
.like-button { border: 1px solid #ddd; background: white; border-radius: 3px; padding: 3px 8px; font: inherit; color: #555; cursor: pointer; }
.like-button[aria-pressed="true"] { color: #e0457b; border-color: #f2b5ca; background: #fff5f8; }
.like-button:disabled { opacity: .6; }
.photo-comments { background: #f5f5f5; border-top: 1px solid #eee; margin-top: 7px; padding: 7px 10px; }
.comment-list { list-style: none; margin: 0 0 6px; padding: 0; }
.comment-list li { font-size: 11px; line-height: 1.8; overflow-wrap: anywhere; }
.comment-list strong { color: #38778f; font-weight: normal; }
.comment-list strong.owner-comment { font-weight: bold; }
.comment-list time { color: #aaa; font: 9px Tahoma, sans-serif; }
.photo-comment-form { display: flex; gap: 4px; }
.photo-comment-form input { border: 1px solid #ccc; padding: 4px; background: white; font-size: 11px; min-width: 0; }
.photo-comment-form input[name="name"] { width: 72px; flex-shrink: 0; }
.photo-comment-form input[name="message"] { flex: 1; }
@media (max-width: 640px) { .photo-comment-form input { font-size: 16px; min-height: 38px; } .like-button, .photo-comment-form .mini-button { min-height: 38px; } }
.photo-list-table { border-collapse: collapse; width: 100%; font-size: 11px; text-align: center; }
.photo-list-table th { background: #eee; font-weight: normal; border-top: 1px solid #bbb; padding: 7px 3px; }
.photo-list-table td { border-bottom: 1px dotted #ccc; padding: 10px 3px; }
.photo-list-table th:first-child { width: 33px; }
.photo-list-table th:last-child { width: 48px; }
.photo-list-table td:nth-child(2) { text-align: left; line-height: 1.6; }
.classic-guest-form { padding: 10px 10px 7px; margin-bottom: 22px; }
.guest-write-main { display: block; }
.guest-minimi { display: flex; align-items: flex-end; justify-content: center; background: repeating-linear-gradient(0deg, #f7f7f7 0, #f7f7f7 15px, #f3f3f3 15px, #f3f3f3 16px); min-height: 100px; padding-bottom: 10px; }
.guest-minimi img { width: 48px; height: 64px; image-rendering: pixelated; }
.classic-guest-form textarea { height: 100px; min-height: 100px; display: block; font-size: 12px; }
.guest-write-bottom { display: flex; align-items: center; gap: 5px; margin-top: 7px; }
.guest-write-bottom label { font-size: 11px; margin: 0; white-space: nowrap; }
.guest-write-bottom input { width: 85px; height: 23px; padding: 2px 4px; margin: 0; }
.guest-write-bottom .char-count { margin-left: auto; font-size: 9px; white-space: nowrap; }
.guest-write-bottom .primary-button { min-height: 23px; padding: 2px 10px; }
.classic-guest-form .storage-hint { margin-top: 5px; font-size: 9px; }
.guest-entry { display: block; padding: 0; border: 0; margin-bottom: 22px; }
.guest-entry > header { display: flex; align-items: center; justify-content: flex-start; flex-wrap: wrap; gap: 7px; min-height: 26px; margin: 0; padding: 5px 9px; background: #eee; font-size: 10px; }
.guest-number { font: 9px Tahoma, sans-serif; color: #888; }
.guest-entry header strong { color: #38778f; font-weight: normal; font-size: 11px; }
.guest-home-icon { color: #6695a3; font-size: 12px; }
.guest-entry time { color: #999; font: 9px Tahoma, sans-serif; }
.guest-entry-body { display: grid; grid-template-columns: 102px minmax(0, 1fr); gap: 16px; padding: 14px 9px 16px; min-height: 140px; }
.guest-entry-body .guest-minimi { background: white; min-height: 105px; align-items: center; padding: 0; }
.guest-entry-body > p { font-size: 12px; line-height: 1.8; padding-top: 4px; }
.guest-replies { background: #f5f5f5; border-top: 1px solid #eee; padding: 7px 10px; font-size: 10px; }
.guest-replies .reply-toggle { font-size: 10px; color: #888; }
.reply-list p { font-size: 11px; line-height: 1.8; margin-bottom: 3px; }
.reply-list strong { font-size: 11px; font-weight: normal; }
.reply-form { display: flex; align-items: center; gap: 4px; margin-top: 6px; }
.reply-form label:first-child { width: 65px; flex-shrink: 0; }
.reply-form label:nth-child(2) { flex: 1; min-width: 0; }
.reply-form input { width: 100%; border: 1px solid #ccc; padding: 4px; background: white; font-size: 11px; }
.classic-pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin: 15px 0 5px; font: 11px Tahoma, sans-serif; }
.classic-pagination a { padding: 3px 5px; color: #888; }
.classic-pagination a[aria-current] { color: #3889a0; font-weight: bold; text-decoration: underline; }

@media (max-width: 950px) and (min-width: 641px) {
  .desktop { margin-top: 38px; }
  .notebook { height: 544px; padding: 16px; }
  .paper { padding: 9px 7px 7px; }
  .home-header, .paper-grid { grid-template-columns: 170px minmax(0, 1fr); gap: 12px; }
  .profile-panel { padding: 13px; }
  .binder { left: 172px; }
  .notebook:before, .notebook:after { left: 189px; }
  .content-panel { padding: 11px 10px; }
  .recent-news { grid-template-columns: 1fr; gap: 5px; }
  .news-counts { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3px; font-size: 9px; }
  .news-counts a { padding: 3px 0; }
  .news-counts b { font-size: 9px; }
  .home-address { display: none; }
  .desktop-footer > span:last-child { width: 100%; }
}
@media (max-width: 640px) {
  body { background-size: 10px 10px; }
  .desktop { width: auto; max-width: none; margin: 20px 12px; }
  .notebook { height: auto; min-height: 0; padding: 12px; border-radius: 7px; }
  .notebook-stitch { inset: 6px; border-radius: 5px; }
  .notebook:before, .notebook:after { display: none; }
  .paper { height: auto; padding: 10px 7px 7px; }
  .home-header { display: flex; flex-direction: column-reverse; align-items: stretch; gap: 8px; height: auto; margin-bottom: 12px; }
  .home-title { padding: 0; align-items: baseline; }
  .home-title h1 { font-size: 18px; }
  .home-address { font-size: 9px; }
  .visit-counter { justify-content: flex-start; }
  .paper-grid { display: flex; flex-direction: column; gap: 11px; height: auto; }
  .profile-panel { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 5px 12px; padding: 9px; min-height: 122px; }
  .profile-photo { grid-column: 1; grid-row: 1/3; height: 99px; align-items: flex-start; }
  .profile-photo img { width: 92px; height: 138px; }
  .mood-control { grid-column: 2; grid-row: 1; margin: 0; min-height: 32px; height: 32px; align-self: start; }
  .mood-control select { height: 30px; }
  .profile-intro { grid-column: 2; grid-row: 2; font-size: 11px; line-height: 1.5; padding: 0; }
  .profile-bottom { grid-column: 1/-1; margin-top: 3px; }
  .profile-tools { margin: 0; border: 0; gap: 10px; font-size: 9px; }
  .profile-tools a, .profile-tools button { min-height: 30px; display: flex; align-items: center; }
  .profile-identity, .shortcut-label { display: none; }
  .binder, .bookmarks { display: none; }
  .mobile-nav { display: flex; align-items: stretch; gap: 3px; }
  .mobile-nav a { flex: 1; min-width: 0; min-height: 44px; display: flex; align-items: center; justify-content: center; border: 1px solid #276977; border-radius: 4px 4px 0 0; color: white; background: var(--selected); font-size: 11px; letter-spacing: -.6px; }
  .mobile-nav a[aria-current="page"] { background: white; color: #333; border-bottom-color: white; }
  .content-panel { height: auto; min-height: 420px; padding: 12px 10px; overflow: visible; }
  .recent-news { grid-template-columns: 1fr; gap: 8px; margin-bottom: 13px; }
  .news-list { font-size: 11px; }
  .news-list li + li { margin-top: 6px; }
  .news-counts { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; font-size: 9px; }
  .news-counts a { padding: 5px 0; }
  .news-counts b { font-size: 9px; }
  .room-heading { min-height: 40px; }
  .room-heading h2 { gap: 4px; }
  .room-heading h2 > span { font-size: 9px; }
  .room-heading h2 > b { font-size: 10px; }
  .room-expand { min-width: 44px; min-height: 44px; justify-content: flex-end; font-size: 0; }
  .room-expand .icon { width: 14px; height: 14px; }
  .room-art { aspect-ratio: 1.8; }
  .room-art .room-avatar { width: 34px; height: 51px; }
  .greeting-heading { margin-top: 14px; min-height: 28px; }
  .greeting-heading > a { min-height: 32px; display: inline-flex; align-items: center; }
  .quick-guest-fields { flex-wrap: wrap; gap: 5px; }
  .quick-guest-title { width: 34px; }
  .quick-guest-form #guest-name { width: calc(100% - 39px); max-width: none; }
  .quick-guest-form #guest-message { flex: 1; }
  .guest-form input, .guest-form textarea, .editor-dialog textarea { font-size: 16px; }
  .quick-guest-form input { height: 36px; font-size: 16px; }
  .quick-guest-form .primary-button { min-height: 44px; padding: 7px 12px; font-size: 12px; }
  .guest-form .primary-button { min-height: 44px; }
  .guest-form input { height: 40px; }
  .greeting-preview { font-size: 11px; padding: 7px 0; }
  .desktop-footer { gap: 6px; margin-top: 8px; }
  .theme-widget { width: 100%; }
  .theme-choice { width: 44px; height: 44px; min-width: 44px; border: 0; box-shadow: none; background: transparent!important; position: relative; }
  .theme-choice:before { content: ""; position: absolute; inset: 11px; background: #e6e6e6; border: 1px solid #777; box-shadow: inset 0 0 0 2px #fff; }
  .theme-choice.rose:before { background: #ead5da; }
  .theme-choice[aria-pressed="true"] { outline: 0; }
  .theme-choice[aria-pressed="true"]:before { outline: 1px solid #fff; outline-offset: 1px; }
  .theme-choice:focus-visible { outline: 2px solid #155e85; }
  .desktop-footer > span { font-size: 8px; }
  .desktop-footer > span:last-child { width: 100%; }
  .page-heading > span { font-size: 9px; }
  .guest-entry header { flex-wrap: wrap; gap: 3px; }
  .guest-entry p { font-size: 12px; }
  .dialog-actions button { min-height: 44px; }
  .editor-dialog { padding: 18px; }
}
@media (max-width: 360px) {
  .desktop { margin-left: 8px; margin-right: 8px; }
  .notebook { padding: 10px 8px; }
  .paper { padding-left: 6px; padding-right: 6px; }
  .home-title h1 { font-size: 17px; }
  .home-address { display: none; }
  .content-panel { padding-left: 8px; padding-right: 8px; }
  .news-counts { font-size: 8px; gap: 2px; }
  .news-counts b { font-size: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after { animation: none!important; transition: none!important; scroll-behavior: auto!important; }
}

@media (max-width: 640px) {
  .profile-panel { display: block; }
  #home-profile { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 5px 12px; height: auto; }
  .section-panel { min-height: 0; padding: 10px; }
  #section-sidebar { height: auto; }
  .sidebar-title { font-size: 12px; margin-bottom: 6px; }
  .sidebar-tree { display: flex; flex-wrap: wrap; gap: 3px 8px; align-items: flex-start; }
  .sidebar-tree a, .sidebar-tree summary { min-height: 36px; display: flex; align-items: center; }
  .sidebar-tree details { margin: 0; }
  .sidebar-tree summary { padding-right: 5px; }
  .sidebar-tree summary:after { padding-left: 8px; }
  .sidebar-tree .tree-child { margin-left: 0; padding-left: 4px; border: 0; }
  .tree-child:before { display: none; }
  .sidebar-tree details[open] { display: flex; }
  .sidebar-note { padding-top: 5px; margin-top: 7px; font-size: 9px; }
  .sidebar-note br { display: none; }
  .sidebar-bottom { padding-top: 5px; margin-top: 5px; }
  .sidebar-bottom button { min-height: 36px; }
  .side-month { max-width: 280px; width: 100%; align-self: center; padding-bottom: 4px; }
  .side-month a { min-width: 44px; min-height: 36px; display: flex; align-items: center; justify-content: center; }
  .side-calendar { max-width: 280px; width: 100%; align-self: center; gap: 0; padding-bottom: 7px; }
  .side-calendar > * { min-height: 28px; }
  .side-calendar a { min-height: 36px; }
  .diary-folders { padding-bottom: 0; }
  .classic-profile { padding: 0; }
  .profile-subtabs { gap: 2px; padding-left: 0; margin-bottom: 14px; }
  .profile-subtabs a { flex: 1; text-align: center; min-height: 40px; padding: 12px 5px 8px; }
  .profile-subtabs a[aria-current] { padding-top: 11px; }
  .profile-nameplate { gap: 12px; padding-left: 4px; padding-right: 4px; }
  .classic-info > div { grid-template-columns: 68px minmax(0, 1fr); }
  .classic-info dt { padding: 10px 6px; }
  .classic-info dd { padding: 10px 8px; }
  .classic-edit-line button { min-height: 44px; }
  .diary-date-strip { gap: 7px; padding: 8px 6px; }
  .diary-date-strip > strong { padding-right: 7px; }
  .diary-days { gap: 0; }
  .diary-days button { min-width: 26px; min-height: 32px; font-size: 11px; }
  .classic-diary-entry { padding: 12px 10px; }
  .classic-diary-entry > p { font-size: 12px; }
  .diary-bottom-nav a { display: inline-flex; align-items: center; min-height: 40px; }
  .album-toolbar a { display: inline-flex; align-items: center; min-height: 40px; }
  .photo-post-meta { gap: 7px; }
  .photo-post-meta .mini-button { min-height: 36px; }
  .photo-list-table td a { display: inline-flex; min-height: 40px; align-items: center; }
  .classic-guest-form { padding: 8px 7px; }
  .guest-minimi img { width: 36px; height: 48px; }
  .classic-guest-form textarea { font-size: 16px; }
  .guest-write-bottom { flex-wrap: wrap; gap: 5px; }
  .guest-write-bottom input { font-size: 16px; width: 82px; height: 40px; }
  .guest-write-bottom .primary-button { min-height: 44px; padding-left: 10px; padding-right: 10px; }
  .guest-entry > header { gap: 5px; padding: 7px; }
  .guest-entry-body { grid-template-columns: 54px minmax(0, 1fr); gap: 10px; padding: 12px 7px; }
  .guest-entry-body .guest-minimi { min-height: 85px; }
  .guest-replies { padding: 5px 7px; }
  .guest-replies .reply-toggle { min-height: 36px; }
  .reply-form { flex-wrap: wrap; }
  .reply-form label:first-child { width: 58px; }
  .reply-form input { font-size: 16px; min-height: 38px; }
  .reply-form .mini-button { min-height: 40px; }
  .classic-pagination a { min-width: 40px; min-height: 40px; display: flex; align-items: center; justify-content: center; }
}
/* Keep the photo title and author row at the top, as in the archived album. */
.sidebar-bottom.album-toolbar { margin: 8px 0 0; justify-content: center; }
.photo-post-title { font-weight: bold; }
.guest-minimi img { width: 54px; height: 81px; object-fit: contain; }
@media (max-width: 640px) {
  .guest-minimi img { width: 44px; height: 66px; }
}

/* The wardrobe uses the same small type and square controls as the mini-home. */
button.profile-photo { position: relative; width: 100%; padding: 0; cursor: pointer; }
.profile-photo > span { position: absolute; bottom: 4px; right: 4px; padding: 3px 5px; background: #fffe; border: 1px solid #bbb; color: #555; font-size: 10px; }
.avatar-dialog { width: 660px; max-height: calc(100dvh - 32px); padding: 20px; font-size: 12px; background: #fff; }
.avatar-dialog .dialog-heading { margin-bottom: 8px; padding-bottom: 9px; border-bottom: 1px solid #aaa; }
.avatar-instruction { color: #777; line-height: 1.6; margin-bottom: 17px; }
.avatar-workspace { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 20px; }
.avatar-preview { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.avatar-preview-stage { width: 180px; height: 270px; display: grid; place-items: center; border: 1px solid #ccc; background: linear-gradient(#eee 1px, transparent 1px), linear-gradient(90deg, #eee 1px, transparent 1px), #fafafa; background-size: 12px 12px; }
.avatar-preview-stage img { width: 144px; height: 240px; image-rendering: pixelated; }
.avatar-preview > strong { color: #34879b; font-size: 12px; }
.avatar-preview > span { color: #888; font-size: 10px; }
.avatar-preview > button { margin-top: 5px; }
.avatar-categories { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3px; margin-bottom: 16px; }
.avatar-categories button { padding: 7px 2px; min-height: 33px; font-size: 11px; white-space: nowrap; }
.avatar-categories button[aria-pressed="true"] { background: #308da3; color: white; border-color: #25758a; }
.avatar-field { padding: 0; margin: 0 0 14px; border: 0; min-width: 0; }
.avatar-field legend { padding: 0 0 8px; color: #555; font-weight: bold; }
.avatar-item-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.avatar-item { position: relative; min-width: 0; cursor: pointer; }
.avatar-item input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.avatar-item-card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 8px 2px; border: 1px solid #d0d0d0; background: #fafafa; color: #666; min-height: 110px; font-size: 11px; }
.avatar-item-card img { width: 48px; height: 80px; image-rendering: pixelated; }
.avatar-item input:checked + .avatar-item-card { border-color: #2c8b9f; background: #edf7f9; box-shadow: inset 0 0 0 1px #2c8b9f; color: #1d7083; }
.avatar-item input:focus-visible + .avatar-item-card { outline: 2px solid #333; outline-offset: 2px; }
.avatar-colors { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.avatar-colors .avatar-item-card { min-height: 58px; padding: 8px 2px; }
.avatar-item-card i { width: 20px; height: 20px; border: 1px solid #0003; }
.avatar-dialog .field-hint { border-top: 1px dotted #ccc; padding-top: 12px; margin-top: 16px; line-height: 1.6; }
.avatar-dialog .dialog-actions { margin-top: 12px; }
.avatar-dialog button:disabled { opacity: .45; cursor: default; }
@media (max-width: 640px) {
  .avatar-dialog { padding: 14px; max-width: calc(100vw - 20px); max-height: calc(100dvh - 20px); }
  .avatar-workspace { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .avatar-preview { display: grid; grid-template-columns: 102px minmax(0, 1fr); grid-template-rows: auto auto auto; column-gap: 18px; max-width: 280px; width: 100%; margin: 0 auto; }
  .avatar-preview-stage { grid-row: 1/4; width: 102px; height: 174px; }
  .avatar-preview-stage img { width: 96px; height: 160px; }
  .avatar-preview > strong { align-self: end; }
  .avatar-preview > span { align-self: center; }
  .avatar-preview > button { justify-self: start; align-self: start; min-height: 36px; }
  .avatar-categories button { min-height: 42px; }
  .avatar-item-card { min-height: 110px; }
  .avatar-dialog .dialog-actions { position: sticky; bottom: -14px; background: #fff; padding: 8px 0; }
  .avatar-dialog .dialog-actions button { min-height: 44px; }
}

/* Role-based controls: only 지영 sees management tools. */
body:not([data-role="owner"]) .owner-only { display: none !important; }
body[data-role="owner"] .visitor-only { display: none !important; }
.mood-control #mood-text { font-size: 11px; color: #555; }
.profile-photo { position: relative; }
.profile-photo-edit { position: absolute; bottom: 4px; right: 4px; padding: 3px 5px; background: #fffe; border: 1px solid #bbb; color: #555; font-size: 10px; }
.role-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.role-bar .text-button { color: #2b7f95; font-size: 9px; text-decoration: underline; text-underline-offset: 2px; }
.loading-note { font-size: 11px; color: #888; padding: 40px 0; text-align: center; }
.news-empty { font-size: 11px; color: #888; line-height: 1.8; }
.muted { color: #aaa; }
.locked-note { font-size: 11px; color: #888; padding: 22px 8px; text-align: center; line-height: 1.8; }
.vis-badge { display: inline-block; font-size: 9px; font-weight: normal; padding: 1px 4px; border: 1px solid #ccc; color: #777; background: #fafafa; vertical-align: middle; margin-left: 4px; }
.vis-badge.vis-friend { color: #2b7f95; border-color: #9cc9d5; background: #eef7f9; }
.vis-badge.vis-private { color: #a24b5d; border-color: #e1b1bb; background: #fbf0f2; }
.owner-actions { display: inline-flex; gap: 6px; margin-left: 6px; }
.owner-actions .text-button, .reply-delete { color: #888; font-size: 10px; text-decoration: underline; }
.guest-entry > header .owner-actions { margin-left: auto; }
.secret-entry .guest-entry-body > p { color: #999; }
.secret-check { display: inline-flex; align-items: center; gap: 3px; font-size: 10px !important; color: #777; }
.guest-write-bottom .secret-check input { width: auto; height: auto; margin: 0; }
.honeypot { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.classic-diary-entry + .classic-diary-entry { margin-top: 10px; }
.photo-owner-tools { justify-content: flex-start; margin-top: 8px; }
.room-caption .text-button { font-size: 9px; color: #2b7f95; }
.form-dialog { width: 440px; font-size: 12px; max-height: calc(100dvh - 32px); }
.form-dialog.wide { width: 620px; }
.form-field { margin-bottom: 12px; min-width: 0; }
.form-dialog .form-field label { display: block; font-size: 11px; color: #555; margin-bottom: 5px; }
.form-field input:not([type=checkbox]):not([type=radio]), .form-field textarea, .form-field select { width: 100%; border: 1px solid #bbb; padding: 6px; font: inherit; font-size: 12px; background: #fff; color: #333; }
.form-field textarea { resize: vertical; line-height: 1.7; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.vis-options { border: 1px solid #ddd; padding: 8px 10px 4px; margin: 4px 0 0; }
.vis-options legend { font-size: 11px; color: #555; padding: 0 4px; }
.vis-options > div { display: flex; gap: 14px; flex-wrap: wrap; }
.form-dialog .vis-options label { display: inline-flex; gap: 4px; align-items: center; font-size: 12px; min-height: 28px; margin: 0; }
.vis-options .field-hint { margin-top: 2px; font-size: 10px; }
.confirm-text { line-height: 1.8; margin-bottom: 10px; }
.form-dialog .danger-button { background: #fff; color: #a24b5d; border-color: #c98a97; }
.upload-preview { margin: -4px 0 12px; border: 1px solid #ddd; background: #fafafa; }
.upload-preview img { max-height: 160px; width: auto; margin: 0 auto; display: block; }
.folder-edit-head { display: grid; grid-template-columns: 16px minmax(0, 1fr) 150px 52px 60px; gap: 6px; font-size: 11px; color: #777; padding: 0 0 4px; border-bottom: 1px solid #e4e4e4; }
.folder-edit-head span:first-child { grid-column: 2; }
.folder-editor { list-style: none; margin: 0 0 8px; padding: 0; }
.folder-edit { display: grid; grid-template-columns: 16px minmax(0, 1fr) 150px 52px 60px; gap: 6px; align-items: center; padding: 6px 0; border-bottom: 1px dotted #ddd; }
.folder-edit.is-category { padding-left: 18px; grid-template-columns: 16px minmax(0, 1fr) 150px 52px 60px; margin-left: 0; }
.folder-edit input, .folder-edit select { min-width: 0; border: 1px solid #bbb; padding: 5px 6px; font-size: 12px; background: #fff; }
.folder-edit.is-category .folder-edit-place { border-color: #9cc9d4; }
.folder-edit-count { font-size: 11px; color: #888; white-space: nowrap; }
.folder-edit .folder-edit-remove { padding: 3px 6px; color: #a24b5d; }
.folder-edit.is-removed { opacity: .5; }
.folder-edit.is-removed .folder-edit-name { text-decoration: line-through; }
.folder-edit.is-removed .folder-edit-remove { opacity: 1; color: #1d7083; }
.folder-edit-add { display: flex; gap: 6px; margin-bottom: 8px; }
.category-mark { color: #aaa; font-size: 11px; text-align: center; }
.folder-mark { display: inline-block; flex-shrink: 0; width: 10px; height: 7px; background: #f3d688; border: 1px solid #c4aa69; box-shadow: 0 -2px 0 -1px #c4aa69; }
.form-dialog .sr-only { position: absolute; }
@media (max-width: 640px) {
  .form-dialog, .form-dialog.wide { width: calc(100vw - 20px); padding: 14px; }
  .form-row { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .form-field input:not([type=checkbox]):not([type=radio]), .form-field textarea, .form-field select, .folder-edit input, .folder-edit select { font-size: 16px; min-height: 40px; }
  .folder-edit-head { display: none; }
  .folder-edit, .folder-edit.is-category { grid-template-columns: 16px minmax(0, 1fr) auto; grid-template-areas: 'mark name name' '. place place' '. count remove'; row-gap: 6px; }
  .folder-edit > :nth-child(1) { grid-area: mark; } .folder-edit-name { grid-area: name; } .folder-edit-place { grid-area: place; } .folder-edit-count { grid-area: count; } .folder-edit-remove { grid-area: remove; min-height: 36px; }
  .folder-edit-add .mini-button { min-height: 40px; flex: 1; }
  .form-dialog .vis-options label { min-height: 40px; }
  .role-bar .text-button { min-height: 36px; font-size: 10px; }
  .owner-actions .text-button, .room-caption .text-button { min-height: 32px; }
  .secret-check { min-height: 40px; }
  .profile-photo-edit { min-height: 32px; }
}

/* The address is the real host, which can be long on preview domains. */
.home-title { min-width: 0; }
.home-address { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-identity span { overflow-wrap: anywhere; }

/* Mini room: drawn as SVG from the saved layout. */
.room-art > svg { display: block; width: 100%; height: 100%; }
.room-caption > .room-owner-tools { display: inline-flex; gap: 8px; background: none; border: 0; padding: 0; }
.room-dialog { width: 780px; max-height: calc(100dvh - 32px); padding: 18px 20px; font-size: 12px; background: #fff; }
.room-dialog .dialog-heading { margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid #aaa; }
.room-stage { aspect-ratio: 400 / 190; border: 1px solid #bbb; background: #eee; touch-action: none; user-select: none; }
.room-stage > svg { display: block; width: 100%; height: 100%; }
.room-piece { cursor: grab; outline: none; }
.room-piece:active { cursor: grabbing; }
.room-piece:focus-visible > :not(image) { filter: drop-shadow(0 0 1.5px #1d6c80); }
.room-piece.selected > *:not(polygon:first-child) { filter: drop-shadow(0 0 1px #2c8b9f) drop-shadow(0 0 1px #2c8b9f); }
.room-selection { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; min-height: 40px; padding: 8px 0 4px; border-bottom: 1px dotted #ccc; }
.room-selection-head { display: flex; flex-direction: column; gap: 2px; }
.room-selection-head strong { color: #1d7083; font-size: 12px; }
.room-selection-head span, .room-hint { color: #888; font-size: 10px; line-height: 1.6; }
.room-tools, .room-moves, .room-colors { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.room-moves .mini-button { width: 28px; height: 26px; font-size: 13px; padding: 0; }
.room-tools > .mini-button { min-height: 26px; padding: 3px 8px; }
.room-swatch { display: inline-flex; align-items: center; gap: 5px; border: 1px solid #ccc; background: #fafafa; padding: 3px; font-size: 11px; color: #555; }
.room-swatch i { display: block; width: 18px; height: 18px; border: 1px solid #0003; }
.room-swatch.wide { padding: 4px 8px 4px 4px; }
.room-swatch[aria-pressed="true"] { border-color: #2c8b9f; box-shadow: inset 0 0 0 1px #2c8b9f; background: #edf7f9; color: #1d7083; }
.room-status { min-height: 18px; color: #a24b5d; font-size: 11px; padding: 3px 0; }
.room-tabs { grid-template-columns: repeat(5, minmax(0, 1fr)); margin-bottom: 10px; }
.room-choice-grid { display: flex; flex-wrap: wrap; gap: 5px; }
.room-choice-grid .mini-button { min-height: 28px; padding: 4px 10px; font-size: 11px; }
.room-choice-grid .mini-button[aria-pressed="true"] { background: #308da3; color: #fff; border-color: #25758a; }
.room-item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; margin-top: 6px; }
.room-item-card { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px; border: 1px solid #d0d0d0; background: #fafafa; color: #555; font-size: 11px; }
.room-item-card:hover { border-color: #2c8b9f; background: #f2f9fa; }
.room-thumb { display: block; width: 58px; height: 58px; }
.room-thumb svg { width: 100%; height: 100%; display: block; }
.room-actions { justify-content: flex-start; }
.room-actions > span { flex: 1; }
@media (max-width: 640px) {
  .room-dialog { width: calc(100vw - 16px); max-width: calc(100vw - 16px); padding: 12px; }
  .room-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .room-moves .mini-button { width: 44px; height: 40px; }
  .room-tools > .mini-button, .room-choice-grid .mini-button { min-height: 40px; }
  .room-swatch i { width: 28px; height: 28px; }
  .room-actions { flex-wrap: wrap; }
  .room-actions > span { display: none; }
  .room-actions button { min-height: 44px; }
}


/* Skin: outside background patterns, tab colors, and content font. */
body[data-bg="dots"] { background: radial-gradient(var(--grid) 1.7px, transparent 2px) 0 0 / 14px 14px, var(--canvas); }
body[data-bg="stripe"] { background: repeating-linear-gradient(90deg, var(--grid) 0 7px, transparent 7px 14px), var(--canvas); }
body[data-bg="check"] { background: conic-gradient(var(--grid) 25%, transparent 0 50%, var(--grid) 0 75%, transparent 0) 0 0 / 28px 28px, var(--canvas); }
body[data-bg="heart"] { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28'%3E%3Cpath d='M14 19 9.5 14.5a2.6 2.6 0 0 1 4.5-3 2.6 2.6 0 0 1 4.5 3z' fill='rgba(255,255,255,.5)'/%3E%3C/svg%3E") 0 0 / 28px 28px, var(--canvas); }
body[data-bg="star"] { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Cpath d='M16 9l2 4.6 5 .5-3.8 3.3 1.1 4.9L16 19.8l-4.3 2.5 1.1-4.9L9 14.1l5-.5z' fill='rgba(255,255,255,.55)'/%3E%3C/svg%3E") 0 0 / 32px 32px, var(--canvas); }
body[data-bg="plain"] { background: var(--canvas); }
.desktop-footer { color: var(--canvas-text, #353535); }
.bookmarks a, .mobile-nav a { border-color: var(--tab-line, #276977); }
.bookmarks a:hover { background: var(--tab-hover, #16758b); }
.bookmarks a[aria-current="page"] { border-left-color: white; }
.mobile-nav a[aria-current="page"] { border-bottom-color: white; }
:is(.home-title h1, #profile-bio, .profile-about, .classic-diary-entry h3, .classic-diary-entry > p, .guest-entry-body > p, .photo-description, .photo-post-title, .news-name, .greeting-preview, .reply-list p) { font-family: var(--content-font, inherit); }
body[data-hand="true"] :is(#profile-bio, .profile-about, .classic-diary-entry > p, .guest-entry-body > p, .photo-description, .reply-list p) { font-size: 15px; line-height: 1.6; }
body[data-hand="true"] .home-title h1 { font-size: 22px; }
.skin-open { color: #2b7f95; font-size: 10px; text-decoration: underline; text-underline-offset: 2px; }
.skin-dialog { width: 640px; max-height: calc(100dvh - 32px); padding: 18px 20px; font-size: 12px; background: #fff; }
.skin-dialog .dialog-heading { margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid #aaa; }
.skin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 5px; }
.skin-choice { position: relative; cursor: pointer; }
.skin-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.skin-choice > span { display: flex; align-items: center; gap: 6px; min-height: 34px; padding: 4px 7px; border: 1px solid #d0d0d0; background: #fafafa; color: #555; font-size: 11px; }
.skin-choice i { flex: 0 0 auto; width: 20px; height: 20px; border: 1px solid #0003; }
.skin-choice input:checked + span { border-color: #2c8b9f; background: #edf7f9; box-shadow: inset 0 0 0 1px #2c8b9f; color: #1d7083; }
.skin-choice input:focus-visible + span { outline: 2px solid #333; outline-offset: 2px; }
.font-sample { font-size: 15px; font-weight: normal; color: #333; min-width: 46px; }
.bg-sample { background-color: #b7b7b7; }
.bg-sample[data-bg="grid"] { background: linear-gradient(#999 1px, transparent 1px) 0 0 / 6px 6px, linear-gradient(90deg, #999 1px, transparent 1px) 0 0 / 6px 6px, #b7b7b7; }
.bg-sample[data-bg="dots"] { background: radial-gradient(#8e8e8e 1.4px, transparent 1.6px) 0 0 / 7px 7px, #b7b7b7; }
.bg-sample[data-bg="stripe"] { background: repeating-linear-gradient(90deg, #999 0 3px, #b7b7b7 3px 6px); }
.bg-sample[data-bg="check"] { background: conic-gradient(#999 25%, #b7b7b7 0 50%, #999 0 75%, #b7b7b7 0) 0 0 / 10px 10px; }
.bg-sample[data-bg="heart"] { background: #b7b7b7 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20'%3E%3Cpath d='M10 15 5.5 10.5a2.6 2.6 0 0 1 4.5-3 2.6 2.6 0 0 1 4.5 3z' fill='%23eee'/%3E%3C/svg%3E") center / 20px 20px; }
.bg-sample[data-bg="star"] { background: #b7b7b7 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20'%3E%3Cpath d='M10 4l1.6 3.6 3.9.4-3 2.6.9 3.8L10 12.4l-3.4 2 .9-3.8-3-2.6 3.9-.4z' fill='%23eee'/%3E%3C/svg%3E") center / 20px 20px; }
.avatar-dialog .avatar-categories { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 640px) {
  .skin-dialog { width: calc(100vw - 16px); max-width: calc(100vw - 16px); padding: 12px; }
  .skin-choice > span { min-height: 44px; }
  .skin-open { min-height: 40px; display: inline-flex; align-items: center; }
  .avatar-dialog .avatar-categories { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.skin-grid.fonts { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.skin-grid.fonts .font-sample { font-size: 18px; }
@media (max-width: 640px) {
  .profile-photo-edit { bottom: 0; right: 0; left: 0; min-height: 24px; padding: 2px 0; font-size: 9px; border-width: 1px 0 0; background: #fffd; }
}
/* Larger windows: the whole PC homepage is zoomed evenly (see fit.js). */
@media (min-width: 951px) {
  .fit .desktop { zoom: var(--fit, 1); margin-top: 28px; margin-bottom: 16px; }
}

/* Pixel minimi (v4 sprite atlas) and pixel mini room */
.profile-photo img { width: 140px; height: 219px; object-fit: contain; image-rendering: pixelated; }
.profile-nameplate img, .guest-minimi img, .avatar-item-card img { width: 40px; height: 68px; object-fit: contain; image-rendering: pixelated; }
.avatar-preview-stage { width: 190px; height: 290px; }
.avatar-preview-stage img { width: 158px; height: 272px; image-rendering: pixelated; }
.room-art > .room-pixels { display: block; width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.room-stage { position: relative; }
.room-stage > .room-pixels { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; pointer-events: none; }
.room-stage > svg { position: relative; }
.room-stage > svg * { fill-opacity: 0; stroke-opacity: 0; }
.room-stage > svg image { opacity: 0; }
.room-stage > svg .room-grid *, .room-stage > svg .room-outline * { fill-opacity: 1; stroke-opacity: 1; }
.room-stage .room-piece.selected > *, .room-stage .room-piece:focus-visible > * { filter: none; }
.room-stage .room-piece.selected *:not(image) { stroke: #2c8b9f; stroke-opacity: 1; stroke-width: 1.4; }
.room-stage .room-piece:focus-visible *:not(image) { stroke: #1d6c80; stroke-opacity: .8; }
.image-dialog > img.pixel-image { image-rendering: pixelated; }
@media (max-width: 640px) {
  .avatar-preview-stage { width: 100px; height: 150px; }
  .avatar-preview-stage img { width: 79px; height: 136px; }
  .profile-photo img { width: 79px; height: 136px; object-position: 50% 0; }
}

/* Phone layout (≤640px): menu first and pinned, readable text, finger-sized targets. */
@media (max-width: 640px) {
  html { -webkit-text-size-adjust: 100%; }
  body { -webkit-tap-highlight-color: rgba(48, 141, 163, .15); }
  .desktop { margin: 10px 8px calc(16px + env(safe-area-inset-bottom)); }
  .notebook { padding: 10px; }
  .paper { padding: 10px 8px 8px; }
  .home-title h1 { font-size: 20px; }
  .home-address, .visit-counter, .visit-counter b { font-size: 11px; }

  /* Menu sits right under the title and stays on screen while scrolling. */
  .mobile-nav { order: -1; position: sticky; top: 0; z-index: 20; margin: 0 -8px; padding: 6px 8px 0; background: var(--sheet, #efefef); border-bottom: 1px solid #aaa; }
  .mobile-nav a { min-height: 44px; font-size: 13px; letter-spacing: -.4px; margin-bottom: -1px; }
  .content-panel { scroll-margin-top: 58px; padding: 14px 12px; }
  .paper-grid { gap: 10px; }

  /* Profile column on the home page. */
  .profile-panel { grid-template-columns: 84px minmax(0, 1fr); }
  .profile-photo { height: 112px; }
  .mood-control { height: 40px; min-height: 40px; }
  .mood-control > span:first-child { font-size: 10px; }
  .mood-control select { height: 38px; font-size: 16px; }
  #mood-text { font-size: 13px; }
  .profile-intro { font-size: 13px; line-height: 1.6; }
  .profile-tools { font-size: 12px; gap: 14px; }
  .profile-tools a, .profile-tools button { min-height: 40px; }
  .profile-photo-edit { min-height: 30px; font-size: 11px; }

  /* Home sections. */
  .section-heading h2, .page-heading h2 { font-size: 15px; }
  .page-heading > span, .section-heading > span { font-size: 11px; }
  .news-list { font-size: 14px; }
  .news-list li + li { margin-top: 0; }
  .news-list a { display: flex; align-items: center; gap: 6px; min-height: 40px; }
  .news-badge { font-size: 11px; flex-shrink: 0; }
  .news-counts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; font-size: 13px; }
  .news-counts a { display: flex; align-items: center; justify-content: space-between; min-height: 40px; padding: 0 2px; }
  .news-counts b { font-size: 13px; }
  .room-heading h2 > span { font-size: 11px; }
  .room-heading h2 > b { font-size: 13px; }
  .room-caption { font-size: 12px; flex-wrap: wrap; gap: 4px; height: auto; min-height: 28px; }
  .room-caption > span:last-child { font-size: 12px; padding: 0; }
  .room-caption .text-button { min-height: 40px; padding: 0 8px; font-size: 13px; }
  .greeting-heading > a { min-height: 40px; font-size: 13px; }
  .quick-guest-title { font-size: 12px; }
  .greeting-preview { font-size: 13px; }

  /* Detail pages: drop what repeats the content area. */
  .section-panel { padding: 10px 12px; }
  .sidebar-title { display: none; }
  .sidebar-tree { font-size: 14px; }
  .sidebar-tree a, .sidebar-tree summary { min-height: 40px; }
  .sidebar-tree small { font-size: 11px; }
  .sidebar-bottom { font-size: 12px; }
  .sidebar-bottom button, .sidebar-bottom a { min-height: 40px; font-size: 13px; padding: 0 10px; }
  body[data-route="profile"] #section-sidebar .sidebar-tree { display: none; }
  body[data-route="profile"] #section-sidebar .sidebar-bottom { border: 0; margin: 0; padding: 0; }
  body:not([data-role="owner"])[data-route="profile"] .profile-panel { display: none; }
  body[data-route="diary"] #section-sidebar .side-calendar { display: none; }
  .side-month { max-width: none; font-size: 15px; }
  .side-month a { font-size: 13px; min-width: 48px; min-height: 44px; }

  /* Profile page. */
  .profile-subtabs a { min-height: 44px; font-size: 13px; }
  .classic-section-head h2 { font-size: 15px; }
  .classic-section-head span, .profile-nameplate span { font-size: 12px; }
  .profile-nameplate strong { font-size: 15px; }
  .profile-about, .classic-info { font-size: 14px; }
  .classic-edit-line .text-button { min-height: 40px; font-size: 13px; }

  /* Diary: one swipeable row of dates. */
  .diary-date-strip { padding: 6px; gap: 8px; }
  .diary-date-strip > strong { font-size: 11px; flex-shrink: 0; }
  .diary-days { position: relative; flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; gap: 2px; padding: 2px 0; -webkit-overflow-scrolling: touch; }
  .diary-days::-webkit-scrollbar { display: none; }
  .diary-days button { flex: 0 0 auto; min-width: 38px; height: 44px; font-size: 14px; scroll-snap-align: center; }
  .diary-entry-date { font-size: 12px; }
  .classic-diary-entry h3 { font-size: 16px; }
  .classic-diary-entry > p { font-size: 15px; line-height: 1.8; }
  .classic-diary-entry { min-height: 0; padding: 14px 12px; }
  .diary-bottom-nav { font-size: 13px; }
  .diary-bottom-nav a { display: inline-flex; align-items: center; min-height: 40px; }
  .empty-day { font-size: 13px; line-height: 1.8; }
  .empty-day .mini-button { min-height: 40px; margin-top: 6px; }

  /* Photos. */
  .photo-post-title { font-size: 15px; }
  .photo-post-meta { font-size: 12px; }
  .photo-post-meta .mini-button { min-height: 36px; }
  .photo-description { font-size: 14px; }
  .post-bottom { font-size: 12px; flex-wrap: wrap; }
  .post-bottom a { display: inline-flex; align-items: center; min-height: 36px; }
  .owner-actions .text-button { min-height: 40px; min-width: 40px; padding: 0 6px; font-size: 13px; }
  .photo-list-table { font-size: 13px; }
  .photo-list-table a { display: block; padding: 10px 0; }

  /* Guestbook. */
  .classic-guest-form textarea { min-height: 110px; }
  /* Name on its own row, then secret toggle · count · send. */
  .guest-write-bottom { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
  .guest-write-bottom > label[for="guest-name"] { font-size: 13px; }
  .guest-write-bottom #guest-name { flex: 1 1 calc(100% - 48px); width: auto; min-width: 0; max-width: none; }
  .guest-write-bottom .secret-check { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-size: 13px !important; }
  .guest-write-bottom .secret-check input { width: 20px; height: 20px; margin: 0; }
  .guest-write-bottom .char-count { margin-left: auto; font-size: 11px; }
  .guest-write-bottom .primary-button { min-width: 64px; }
  .char-count, .storage-hint, .classic-guest-form .storage-hint { font-size: 11px; }
  .classic-info dt { white-space: nowrap; width: 88px; font-size: 13px; }
  .guest-entry header { font-size: 12px; padding: 6px 8px; min-height: 40px; align-items: center; }
  .guest-entry strong { font-size: 13px; }
  .guest-entry header time, .guest-number { font-size: 11px; }
  .guest-entry-body { grid-template-columns: 48px minmax(0, 1fr); gap: 12px; padding: 12px 8px; min-height: 0; }
  .guest-entry-body .guest-minimi { min-height: 0; align-items: flex-start; }
  .guest-entry-body > p, .guest-entry p { font-size: 14px; line-height: 1.7; padding-top: 0; }
  .guest-replies { padding: 4px 8px; }
  .reply-list p { font-size: 13px; }
  .guest-replies .reply-toggle, .reply-delete { min-height: 40px; font-size: 13px; }
  .classic-pagination a { min-width: 40px; min-height: 40px; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; }

  /* Footer and sign-in links. */
  .desktop-footer > span { font-size: 11px; }
  .role-bar { gap: 2px 12px; font-size: 12px; }
  .role-bar .text-button, .theme-widget .text-button { min-height: 44px; font-size: 13px; padding: 0 4px; }

  /* Editing windows: keep the room in view and the save button reachable. */
  .room-dialog, .skin-dialog { max-height: calc(100dvh - 16px); }
  .room-dialog .room-stage { position: sticky; top: -12px; z-index: 2; margin: 0 -12px; border-width: 0 0 1px; }
  .room-dialog .dialog-actions, .skin-dialog .dialog-actions, .form-dialog .dialog-actions { position: sticky; bottom: -12px; z-index: 2; background: #fff; margin: 12px -12px -12px; padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); border-top: 1px solid #ddd; }
  .form-dialog .dialog-actions { margin: 12px 0 0; padding-left: 0; padding-right: 0; bottom: -14px; }
  .room-dialog, .skin-dialog, .form-dialog { overflow-x: hidden; }
  .editor-dialog label, .form-field label { font-size: 13px; }
  .vis-options label { min-height: 40px; display: inline-flex; align-items: center; gap: 4px; font-size: 14px; }
  .field-hint { font-size: 12px; }
  .image-dialog { width: calc(100vw - 16px); padding: 36px 8px 10px; }
  .image-dialog > .icon-button { width: 44px; height: 44px; }
}
@media (max-width: 360px) {
  .mobile-nav a { font-size: 12px; letter-spacing: -.6px; }
  .news-counts { font-size: 12px; }
  .news-counts b { font-size: 12px; }
}


/* Mood dot follows the mood group. */
.mood-dot[data-tone="good"] { background: #f68b95; border-color: #ca6271; }
.mood-dot[data-tone="calm"] { background: #9fd0a8; border-color: #6ea67a; }
.mood-dot[data-tone="low"] { background: #9aa9c9; border-color: #6c7ba0; }

/* 지영's minimi (98×152 sprite, 2×2 px per dot). Thumbnails show it at half size (one dot per px)
   and the preview at full size. The profile photo is an upper-body crop that the app pre-enlarges
   with hard edges; it and the 4× mini room are scaled down smoothly, which keeps
   every pixel (eyes, glasses, outlines) instead of dropping rows at odd sizes. */
.profile-photo { align-items: flex-start; justify-content: center; }
.profile-photo img[data-avatar="bust"] { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: auto; height: 100%; max-width: none; margin: 0; padding: 0; object-fit: contain; image-rendering: auto; }
.profile-nameplate img, .avatar-item-card img { width: 49px; height: 76px; object-fit: contain; image-rendering: auto; }
.avatar-workspace { grid-template-columns: 206px minmax(0, 1fr); }
.avatar-preview-stage { width: 206px; height: 316px; }
.avatar-preview-stage img { width: 196px; height: 304px; image-rendering: pixelated; }
/* The preview stays in view while the wardrobe scrolls (the dialog is the scroll box): beside the
   wardrobe on wide screens, pinned under the dialog's top edge on phones. */
.avatar-preview { position: sticky; top: 0; align-self: start; z-index: 1; }
.room-art > .room-pixels, .room-stage > .room-pixels { image-rendering: auto; }
@media (max-width: 640px) {
  .profile-photo { height: auto; aspect-ratio: 98 / 92; align-self: start; }
  .profile-photo img[data-avatar="bust"] { width: 100%; height: 100%; object-fit: cover; object-position: 50% 100%; }
  .profile-photo-edit { left: auto; right: 0; bottom: 0; min-height: 30px; min-width: 44px; padding: 2px 6px; font-size: 11px; border-width: 1px 0 0 1px; }
  .avatar-workspace { grid-template-columns: minmax(0, 1fr); }
  .avatar-preview-stage { width: 104px; height: 158px; }
  .avatar-preview-stage img { width: 98px; height: 152px; }
  .avatar-preview { top: -14px; max-width: none; grid-template-columns: 104px auto; justify-content: center; padding: 8px 0; background: #fff; border-bottom: 1px solid #ddd; }
}

/* Pixel furniture: catalog thumbnails and invisible hit areas over the room bitmap. */
.room-thumb img { width: 100%; height: 100%; display: block; object-fit: contain; }
.room-stage .room-piece .room-hit { stroke: none !important; }

/* Guestbook guests: pixel animal faces (pre-enlarged 4×, scaled down smoothly). */
.guest-minimi img, .guest-entry-body .guest-minimi img { width: 44px; height: 44px; object-fit: contain; image-rendering: auto; }
@media (max-width: 640px) { .guest-minimi img, .guest-entry-body .guest-minimi img { width: 36px; height: 36px; } }

/* Diary paragraphs: every Enter starts a new paragraph. */
.classic-diary-entry > p + p { margin-top: .85em; }
.classic-diary-entry > p.gap { margin-top: 1.9em; }

/* Photo crop editor. */
.crop-field .crop-label { display: block; margin-bottom: 6px; }
.crop-ratios { display: flex; gap: 4px; margin-bottom: 8px; }
.crop-ratios .mini-button[aria-pressed="true"] { background: #2f8ea4; border-color: #2f8ea4; color: #fff; }
.crop-stage { display: flex; justify-content: center; background: #f2f2f2; border: 1px solid #ddd; padding: 8px; }
.crop-frame { position: relative; display: inline-block; overflow: hidden; line-height: 0; touch-action: none; user-select: none; }
.crop-frame img { display: block; max-width: 100%; max-height: 300px; width: auto; height: auto; }
.crop-box { position: absolute; box-sizing: border-box; border: 2px solid #fff; outline: 1px solid rgba(0,0,0,.5); box-shadow: 0 0 0 1200px rgba(0,0,0,.45); cursor: move; touch-action: none; }
.crop-box::before, .crop-box::after { content: ''; position: absolute; inset: 33.33% 0; border-block: 1px solid rgba(255,255,255,.55); pointer-events: none; }
.crop-box::after { inset: 0 33.33%; border-block: 0; border-inline: 1px solid rgba(255,255,255,.55); }
.crop-box:focus-visible { outline: 2px solid #1d6c80; }
.crop-size-label { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 12px; }
.crop-size-label input { flex: 1; }
@media (max-width: 640px) { .crop-frame img { max-height: 240px; } .crop-ratios .mini-button { min-height: 40px; min-width: 56px; font-size: 14px; } .crop-size-label { font-size: 14px; } }

.crop-size-label input { accent-color: #2f8ea4; }
/* Guest face sits right beside the message, top-aligned; the entry is only as tall as its content. */
.guest-entry-body { grid-template-columns: 44px minmax(0, 1fr); gap: 12px; padding: 10px 10px; min-height: 0; align-items: start; }
.guest-entry-body .guest-minimi { min-height: 0; align-items: flex-start; justify-content: flex-start; }
.guest-entry-body > p { padding-top: 2px; }
@media (max-width: 640px) { .guest-entry-body { grid-template-columns: 36px minmax(0, 1fr); gap: 10px; padding: 12px 8px; } }
.guest-entry { margin-bottom: 14px; }

/* Mobile polish (2026-10-23 check). */
.avatar-instruction a { display: inline-flex; align-items: center; min-height: 32px; }
@media (max-width: 640px) {
  /* The whole photo is the "꾸미기" button for 지영; the label sits on a thin strip at the chest, clear of the face. */
  .profile-photo-edit { inset: 0; width: 100%; min-height: 0; min-width: 0; padding: 0 0 2px; display: flex; align-items: flex-end; justify-content: center; border: 0; font-size: 11px; color: #555; background: linear-gradient(transparent 0 78%, rgba(255,255,255,.88) 78%); }
  .photo-post-meta .mini-button { font-size: 12px; }
}

/* Profile info table on phones: the label column is exactly as wide as the grey label cell. */
@media (max-width: 640px) {
  .classic-info > div { grid-template-columns: 96px minmax(0, 1fr); }
  .classic-info dt { width: auto; padding: 10px 8px; }
  .classic-info dd { padding: 10px 10px; }
}
.classic-info dd { word-break: keep-all; overflow-wrap: anywhere; }
.classic-info dt { line-height: 1.6; }

/* Photo album: folder chooser. */
.folder-pick-hint { font-size: 11px; color: #888; margin: 4px 0 12px; }
.folder-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.folder-card { display: block; color: inherit; text-decoration: none; }
.folder-cover { display: block; aspect-ratio: 1; border: 1px solid #ddd; background: #f5f5f5; padding: 4px; }
.folder-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.folder-empty { display: flex; height: 100%; align-items: center; justify-content: center; font-size: 11px; color: #aaa; }
.folder-name { display: block; text-align: center; font-size: 12px; margin-top: 6px; line-height: 1.5; overflow-wrap: anywhere; }
.folder-name small { color: #999; }
.folder-card:hover .folder-cover, .folder-card:focus-visible .folder-cover { border-color: #2f8ea4; }
.folder-pick-owner { margin-top: 16px; font-size: 11px; color: #888; text-align: right; }
.album-toolbar[hidden] { display: none; }
/* A post can hold several photos, stacked. */
.photo-original + .photo-original { margin-top: 8px; }
/* Photo editor: chosen pictures. */
.crop-thumb-list { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }
.crop-thumb { width: 52px; height: 52px; padding: 2px; border: 1px solid #ccc; background: #fff; cursor: pointer; }
.crop-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.crop-thumb[aria-pressed="true"] { border: 2px solid #2f8ea4; padding: 1px; }
.crop-thumb-meta { display: flex; align-items: center; gap: 10px; font-size: 11px; color: #777; margin-bottom: 8px; }
.crop-thumb-meta .text-button { margin-left: auto; }
@media (max-width: 640px) {
  .folder-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .folder-pick-hint, .folder-pick-owner { font-size: 13px; }
  .folder-name { font-size: 14px; }
  .folder-pick-owner .text-button { min-height: 40px; }
  .crop-thumb { width: 56px; height: 56px; }
  .crop-thumb-meta { font-size: 13px; }
  .crop-thumb-meta .text-button { min-height: 40px; }
}

.profile-site { color: #2f8ea4; text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; }
@media (max-width: 640px) { .profile-site { display: inline-block; padding: 6px 0; } }

/* Owner windows: clear save button, counters, unsaved-change bar, photo picker. */
.editor-dialog .dialog-actions .primary-button, .avatar-dialog .dialog-actions .primary-button, .room-dialog .dialog-actions .primary-button, .skin-dialog .dialog-actions .primary-button { background: #2f8ea4; border-color: #25758a; color: #fff; box-shadow: none; font-weight: 600; }
.editor-dialog .dialog-actions .primary-button:hover, .avatar-dialog .dialog-actions .primary-button:hover, .room-dialog .dialog-actions .primary-button:hover, .skin-dialog .dialog-actions .primary-button:hover { background: #25758a; }
.editor-dialog .dialog-actions .primary-button:disabled, .avatar-dialog .dialog-actions .primary-button:disabled { background: #b9d6de; border-color: #b9d6de; }
.dialog-actions .primary-button.danger-button { background: #b5546a; border-color: #9a4459; color: #fff; }
.dialog-actions .primary-button.danger-button:hover { background: #9a4459; }
.form-dialog .dialog-actions { position: sticky; bottom: -24px; z-index: 2; background: #fff; margin: 14px 0 0; padding: 10px 0; border-top: 1px solid #e2e2e2; }
.discard-bar { flex-wrap: wrap; align-items: center; background: #fff7f8 !important; }
.discard-bar > span { flex: 1 1 200px; color: #9a4459; font-size: 12px; }
.field-label { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.field-label label { flex: 1; }
.char-count { font-size: 10px; color: #999; font-variant-numeric: tabular-nums; white-space: nowrap; }
.char-count.near-limit { color: #b5546a; font-weight: 600; }
.secret-input { display: flex; gap: 6px; }
.secret-input input { flex: 1; min-width: 0; }
.secret-input .mini-button { flex-shrink: 0; min-width: 52px; }
.field-warning { color: #b5546a; }
.status-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; font-size: 12px; color: #666; }
.status-pill { display: inline-block; padding: 2px 8px; border: 1px solid #ccc; background: #f4f4f4; color: #777; font-size: 11px; font-weight: 600; }
.status-pill.on { border-color: #8fc6d3; background: #e9f5f8; color: #1d7083; }
.form-side-action { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-top: 14px; padding-top: 12px; border-top: 1px dotted #ddd; font-size: 11px; color: #888; }
.danger-text { color: #b5546a !important; font-weight: 600; }
.file-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.photo-drop { position: relative; }
.photo-drop-label { display: flex !important; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 110px; margin: 0 !important; border: 2px dashed #b9cfd5; background: #f6fafb; color: #557; cursor: pointer; text-align: center; padding: 12px; }
.photo-drop-label strong { font-size: 13px; color: #1d7083; }
.photo-drop-label span { font-size: 11px; color: #888; }
.photo-drop-label:hover, .photo-drop.dragging .photo-drop-label { border-color: #2f8ea4; background: #eaf5f8; }
.photo-drop:focus-within .photo-drop-label { outline: 2px solid #1d6c80; outline-offset: 1px; }
.photo-drop.compact .photo-drop-label { min-height: 0; flex-direction: row; gap: 10px; padding: 8px 10px; }
.photo-drop.full .photo-drop-label { cursor: default; border-style: solid; border-color: #ddd; background: #fafafa; }
.photo-drop.full .photo-drop-label strong { color: #888; }
.crop-thumb-meta .text-button + .text-button { margin-left: 0; }
.form-dialog.xwide { width: 900px; }
@media (min-width: 900px) {
  .photo-edit-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 20px; align-items: start; }
  .photo-edit-media { position: sticky; top: 0; }
}
@media (max-width: 640px) {
  .form-dialog.xwide { width: calc(100vw - 20px); }
  .char-count { font-size: 12px; }
  .secret-input .mini-button { min-height: 40px; }
  .photo-drop-label { min-height: 96px; }
  .photo-drop-label strong { font-size: 15px; }
  .photo-drop-label span { font-size: 13px; }
  .discard-bar > span { font-size: 13px; flex-basis: 100%; }
  .form-dialog .dialog-actions { bottom: -14px; padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
}
