/* WeeDiary 全局样式 —— 手绘 / 卡片 / 暖米色调 */
@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@400;700&family=Patrick+Hand&family=ZCOOL+KuaiLe&display=swap');

/* 本地手绘风中文字体 */
@font-face {
  font-family: 'LeeeafHei';
  src: url('/fonts/LeeeafHei-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}
:root {
  --bg: #f3ede0;
  --paper: #fffdf6;
  --ink: #1f1f1f;
  --line: #1f1f1f;
  --muted: #777;
  --accent: #ec6d6f;
  --teal: #2bb3c0;
  --yellow: #f6dd7d;
  --pink: #f4b6b6;
  --blue: #b9d6dc;
  --green: #c6deb1;
  --shadow: 4px 4px 0 #1f1f1f;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  background-image: radial-gradient(rgba(0,0,0,.06) 1px, transparent 1px);
  background-size: 18px 18px;
  font-family: 'Patrick Hand', 'ZCOOL KuaiLe', 'Microsoft YaHei', sans-serif;
  color: var(--ink);
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* 顶部栏 */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 24px; border-bottom: 3px solid var(--ink);
  background: var(--paper);
  position: sticky; top: 0; z-index: 200;
}
.topbar .logo { display: flex; align-items: center; gap: 8px; }
.topbar .logo img { height: 56px; }
.topbar nav { display: flex; gap: 18px; align-items: center; }
.topbar nav a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%;
  border: 2px solid transparent; transition: .2s;
  font-size: 22px;
}
.topbar nav a.active, .topbar nav a:hover {
  border-color: var(--ink); background: #fff;
}
/* 带手绘图标的导航项：放大为圆角矩形，取消黑圈，用灰→彩表示选中 */
.topbar nav a:has(.nav-ico) {
  width: 60px; height: 60px;
  border-radius: 14px;
  border-color: transparent;
  background: transparent;
}
.topbar nav a:has(.nav-ico):hover,
.topbar nav a:has(.nav-ico).active {
  border-color: transparent;
  background: transparent;
}
.topbar .user-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border: 2px solid var(--ink); border-radius: 20px;
  background: #fff; box-shadow: 2px 2px 0 var(--ink);
}
/* 顶栏圆形头像（点击进入个人中心） —— 占满 nav a 的整个圆形区域 */
.topbar .avatar-circle {
  width: 100%; height: 100%; border-radius: 50%;
  background: #f0e6c8;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 18px; color: #555; overflow: hidden;
  border: 2px solid var(--ink); box-sizing: border-box;
}
.topbar .avatar-circle img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
/* 包含头像的 nav 链接整体改为圆形裁剪容器，避免 img 溢出 */
.topbar nav a { overflow: hidden; padding: 0; }
/* 顶栏导航图标（我的日记 / 共享房间）：手绘风 PNG 图标 */
.topbar nav a .nav-ico {
  width: 100%; height: 100%; object-fit: contain; display: block;
  pointer-events: none;
  filter: grayscale(1) opacity(.55);
  transition: filter .2s;
}
.topbar nav a.active .nav-ico,
.topbar nav a:hover .nav-ico {
  filter: none;
}

/* 通用卡片 */
.card {
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 20px;
}
.btn {
  border: 2.5px solid var(--ink);
  background: var(--paper);
  border-radius: 14px;
  padding: 8px 18px;
  font-size: 16px;
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform .08s;
}
.btn:hover { transform: translate(-1px,-1px); box-shadow: 4px 4px 0 var(--ink); }
.btn:active { transform: translate(2px,2px); box-shadow: 1px 1px 0 var(--ink); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-teal { background: var(--teal); color: #fff; }
.btn-ghost { background: transparent; box-shadow: none; }

input, textarea, select {
  font-family: inherit;
  border: 2px solid var(--ink);
  border-radius: 10px;
  padding: 8px 12px;
  background: #fff;
  font-size: 16px;
  outline: none;
}
input:focus, textarea:focus { box-shadow: 2px 2px 0 var(--ink); }

/* ========== 登录页 ========== */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px;
}
.login-card {
  width: 380px; max-width: 92vw; padding: 32px 28px;
  text-align: center;
}
.login-card .logo-img { width: 180px; }
.login-card h1 { font-family: 'LeeeafHei','Caveat',cursive; font-size: 38px; margin: 4px 0 24px; }
.login-card .form-row { margin: 12px 0; text-align: left; }
.login-card .form-row label { font-size: 14px; color: var(--muted); }
.login-card input { width: 100%; }
.login-card .actions { display: flex; gap: 10px; margin-top: 20px; }
.login-card .actions .btn { flex: 1; }
.tabs { display: flex; gap: 8px; justify-content: center; margin-bottom: 16px; }
.tabs .tab {
  padding: 6px 18px; border: 2px solid var(--ink); border-radius: 999px;
  background: #fff; cursor: pointer;
}
.tabs .tab.active { background: var(--accent); color: #fff; }
.tip { color: var(--muted); font-size: 13px; margin-top: 12px; }

/* ========== 日记页 ========== */
.diary-page { padding: 24px; max-width: 980px; margin: 0 auto; }
.diary-card { padding: 0; overflow: hidden; }
.diary-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; border-bottom: 2px solid var(--ink);
  background: var(--paper);
  flex-wrap: wrap; gap: 10px;
}
.diary-head .date {
  display: flex; align-items: center; gap: 14px;
  font-family: 'LeeeafHei','Caveat',cursive; font-size: 28px;
}
.diary-head .date button { background: none; border: none; font-size: 20px; cursor: pointer; }
.weather { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.weather span { cursor: pointer; opacity: .35; line-height: 0; transition: opacity .15s ease, transform .15s ease; }
.weather span img { width: 32px; height: 32px; display: block; object-fit: contain; pointer-events: none; }
.weather span:hover { opacity: .7; }
.weather span.active { opacity: 1; transform: scale(1.08); }

.timeline { display: grid; grid-template-columns: 70px 1fr; gap: 0; padding: 18px 20px; }
.hours { display: flex; flex-direction: column; gap: 4px; padding-top: 6px; }
.hours .h {
  height: 56px; line-height: 56px; font-size: 18px; color: #555;
  font-family: 'LeeeafHei','Caveat',cursive;
}
.tracks { position: relative; }
.tracks::before {
  content: ''; position: absolute; inset: 0;
  background-image: repeating-linear-gradient(
    to bottom, transparent 0, transparent 27px, rgba(0,0,0,.08) 28px
  );
  pointer-events: none;
}
.evt {
  position: relative;
  margin: 6px 0;
  border: 2.5px solid var(--ink);
  border-radius: 14px;
  padding: 10px 14px;
  display: flex; align-items: center; gap: 14px;
  box-shadow: 3px 3px 0 var(--ink);
  cursor: pointer;
  min-height: 56px;
}
.evt .title { font-size: 20px; font-weight: 700; min-width: 60px; }
.evt .note  { color: #444; flex: 1; }
.evt .photo { width: 56px; height: 56px; object-fit: cover; border: 2px solid var(--ink); border-radius: 6px; background: #fff; }
.evt .pen   { font-size: 18px; }

.add-bar { display: flex; justify-content: center; margin: 16px 0; }
.add-bar button {
  width: 48px; height: 48px; border-radius: 50%;
  border: 2.5px solid var(--ink); background: #fff;
  font-size: 26px; line-height: 1;
}
/* 底部今日总结（漫画对话框气泡） */
.bottom-tip {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 14px 20px 26px;
}
.bottom-tip .avatar-circle {
  width: 52px; height: 52px; border-radius: 50%;
  border: 2.5px solid var(--ink);
  background: #f0e6c8;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; flex: 0 0 52px;
  font-family: 'Caveat', cursive; font-size: 24px; color: #555;
  box-shadow: 2px 2px 0 var(--ink);
  margin-top: 4px;
}
.bottom-tip .avatar-circle img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.bottom-tip .bubble-wrap {
  position: relative; flex: 1; min-width: 0;
}
/* 漫画对话框左侧尾巴：外黑内白两个三角，指向头像方向
   —— 内白三角右端故意向气泡内部延伸 4px，覆盖气泡左边框那段黑线
   —— 内白三角比外黑三角短 4px，top 下移 2px 以垂直居中，使上下黑边等粗 */
.bottom-tip .bubble-wrap::before,
.bottom-tip .bubble-wrap::after {
  content: ''; position: absolute;
  width: 0; height: 0;
}
.bottom-tip .bubble-wrap::before {
  top: 20px;
  left: -10px;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-right: 10px solid var(--ink);
}
.bottom-tip .bubble-wrap::after {
  top: 22px;
  left: -6px;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-right: 10px solid #fff;
}
.bottom-tip .bubble {
  display: block; width: 100%;
  min-height: 72px; max-height: 220px;
  border: 2.5px solid var(--ink); border-radius: 18px;
  background: #fff;
  box-shadow: 3px 3px 0 var(--ink);
  /* 右侧预留 78px 给保存按钮，避免文字溢到按钮下方 */
  padding: 12px 84px 12px 16px;
  font-family: 'Patrick Hand', 'ZCOOL KuaiLe', 'Microsoft YaHei', sans-serif;
  font-size: 17px; line-height: 1.55; color: var(--ink);
  resize: vertical; outline: none;
  box-sizing: border-box;
}
.bottom-tip .bubble::placeholder {
  color: #b7a98c; font-style: italic;
}
.bottom-tip .bubble:focus {
  /* 选中时保持黑框，不变色 */
  border-color: var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
}
/* 气泡内部右下角保存按钮 */
.bottom-tip .bubble-save {
  position: absolute;
  right: 12px;
  bottom: 10px;
  border: 2px solid var(--ink);
  background: var(--yellow);
  border-radius: 12px;
  padding: 4px 14px;
  font-family: inherit;
  font-size: 14px; color: var(--ink);
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--ink);
  transition: transform .1s ease, box-shadow .1s ease;
}
.bottom-tip .bubble-save:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--ink);
}
.bottom-tip .bubble-save:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 var(--ink);
}
.bottom-tip .bubble-save[disabled] {
  opacity: .55; cursor: default;
  transform: none; box-shadow: 2px 2px 0 var(--ink);
}
.bottom-tip .save-status {
  position: absolute; right: 8px; bottom: -18px;
  font-size: 12px; color: var(--muted);
}
.bottom-tip .save-status.ok { color: #2a7; }
.bottom-tip .save-status.err { color: #c33; }

/* 弹窗 */
.modal-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,.4);
  display: none; align-items: center; justify-content: center; z-index: 100;
}
.modal-mask.show { display: flex; }
.modal {
  background: var(--paper); border: 3px solid var(--ink); border-radius: 16px;
  width: 420px; max-width: 92vw; padding: 22px;
  box-shadow: var(--shadow);
}
.modal h3 { margin: 0 0 14px; font-family: 'LeeeafHei','Caveat',cursive; font-size: 26px; }
.modal .form-row { margin: 10px 0; }
.modal .form-row label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.modal .colors { display: flex; gap: 8px; flex-wrap: wrap; }
.modal .colors .sw {
  width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--ink); cursor: pointer;
}
.modal .colors .sw.active { box-shadow: 0 0 0 3px #1f1f1f33; }
.modal .actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }

/* ========== 房间页 ========== */
.room-page { padding: 24px; max-width: 980px; margin: 0 auto; }
.room-title {
  display: inline-block; padding: 6px 22px;
  background: var(--yellow); border: 2.5px solid var(--ink); border-radius: 8px;
  font-size: 22px; margin: 0 auto 14px; font-family: 'LeeeafHei','ZCOOL KuaiLe';
}
/* 房间标题跟随小屋颜色：与颜色选择器的圆点配色一致 */
.room-title[data-color="yellow"] { background: #f1d97a; }
.room-title[data-color="red"]    { background: #e9b3b3; }
.room-title[data-color="blue"]   { background: #cde0e7; }
.room-title[data-color="green"]  { background: #c7dcb5; }
.room-title[data-color="purple"] { background: #dcc4e4; }
.room-page .center { text-align: center; }
.room-card { padding: 0; }
.room-head {
  text-align: center; padding: 14px;
  border-bottom: 2px solid var(--ink);
  font-family: 'LeeeafHei','Caveat',cursive; font-size: 28px;
  display: flex; align-items: center; justify-content: center; gap: 12px;
}
.room-head button { background: none; border: none; font-size: 20px; cursor: pointer; }
.grid {
  padding: 18px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
.cell {
  border: 2.5px solid var(--ink); border-radius: 12px;
  min-height: 200px; padding: 12px; position: relative;
  display: flex; flex-direction: column; gap: 8px;
  cursor: pointer;
}
.cell .who { font-size: 14px; color: #555; }
.cell .ttl { font-size: 22px; font-weight: 700; font-family: 'LeeeafHei','ZCOOL KuaiLe'; }
.cell .ph { width: 100%; max-height: 100px; object-fit: cover; border: 2px solid var(--ink); border-radius: 6px; background:#fff; }
.cell .bb {
  margin-top: auto; align-self: flex-start;
  background: #fff; border: 2px solid var(--ink); border-radius: 12px;
  padding: 4px 10px; font-size: 14px; max-width: 90%;
}
/* 房间格子内的日程备注：复用 .msg 头像+气泡结构，贴在格子底部 */
.cell .msg.cell-note {
  margin: auto 0 0 0;          /* 推到格子底部 */
  align-self: flex-start;
  max-width: 100%;
}
.cell .msg.cell-note .bubble-wrap {
  max-width: calc(100% - 42px); /* 减去头像 32 + gap 10 */
}
.cell .msg.cell-note .bubble-text {
  font-size: 13px;
  padding: 5px 10px;
  line-height: 1.4;
  word-break: break-word;
}
.cell.empty {
  border-style: dashed; color: var(--muted);
  align-items: center; justify-content: center; font-style: italic;
}
.hour-bar {
  text-align: center; padding: 12px; border-top: 2px solid var(--ink);
  font-family: 'LeeeafHei','Caveat',cursive; font-size: 24px;
}
.hour-bar button { background: none; border: none; font-size: 20px; cursor: pointer; }

.message-board {
  margin-top: 18px; padding: 14px 18px;
  display: flex; align-items: center; gap: 12px;
  flex-wrap: wrap;
}
.message-board .label {
  font-family: 'Caveat', cursive; font-size: 22px;
  color: var(--accent);
}
.message-board .label small { display: block; color: #c89c2c; }
.message-board .label-img {
  width: 80px; height: auto; flex: 0 0 auto; display: block;
  user-select: none; -webkit-user-drag: none; pointer-events: none;
}
/* 留言：头像 + 漫画对话框气泡（复用底部今日总结的气泡风格） */
.msg {
  display: inline-flex;
  align-items: flex-start;
  gap: 10px;
  margin: 4px 6px;
  background: transparent;
  border: none;
  padding: 0;
  font-size: 14px;
}
.msg .avatar-circle {
  width: 32px; height: 32px; border-radius: 50%;
  border: 2px solid var(--ink); background: #f0e6c8;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; flex: 0 0 32px;
  font-family: 'Caveat', cursive; font-size: 15px; color: #555;
  box-shadow: 2px 2px 0 var(--ink);
  margin-top: 2px;
}
.msg .avatar-circle img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.msg .bubble-wrap {
  position: relative;
  max-width: 260px;
}
/* 漫画对话框左侧尾巴：
   —— 外黑等腰直角三角（8×8），内白同宽扁三角（8×4），上下各留 2px 黑边
   —— 整体向右平移 2px 使基座深入气泡，既盖住气泡左边框的黑线，又消除圆角处的缝隙 */
.msg .bubble-wrap::before,
.msg .bubble-wrap::after {
  content: ''; position: absolute;
  width: 0; height: 0;
}
.msg .bubble-wrap::before {
  top: 12px;
  left: -6px;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-right: 8px solid var(--ink);
}
.msg .bubble-wrap::after {
  top: 14px;
  left: -4px;
  border-top: 2px solid transparent;
  border-bottom: 2px solid transparent;
  border-right: 8px solid #fff;
}
.msg .bubble-text {
  border: 2px solid var(--ink); border-radius: 14px;
  background: #fff; box-shadow: 2px 2px 0 var(--ink);
  padding: 6px 12px;
  font-size: 14px; line-height: 1.45;
  word-break: break-word;
  color: var(--ink);
}
.msg-input { display: flex; gap: 6px; flex: 1; min-width: 240px; }
.msg-input input { flex: 1; }

/* 房间列表页 */
.rooms-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.rooms-grid.with-roads { display: block; }
.rooms-grid.with-roads .room-row {
  display: grid;
  grid-template-columns: repeat(var(--cols, 3), 1fr);
  gap: 16px;
  align-items: end;
}
.rooms-grid.with-roads .road-strip {
  position: relative;
  z-index: 2;
  height: 80px;
  margin: -40px 0 18px;
  background: #8a8a8a;
  border-top: 3px solid #4e4e4e;
  border-bottom: 3px solid #4e4e4e;
  overflow: hidden;
  border-radius: 2px;
}
.rooms-grid.with-roads .road-strip::before {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 6px;
  transform: translateY(-50%);
  background-image: repeating-linear-gradient(
    to right,
    #ececec 0 56px,
    transparent 56px 104px
  );
}
.room-item {
  position: relative; aspect-ratio: 1 / 1;
  background: url('/img/room-card-yellow.png') no-repeat center center;
  background-size: contain;
  border: none; box-shadow: none; padding: 0;
  cursor: pointer;
  transition: transform .2s ease;
}
.room-item[data-color="yellow"] { background-image: url('/img/room-card-yellow.png'); }
.room-item[data-color="blue"]   { background-image: url('/img/room-card-blue.png'); }
.room-item[data-color="purple"] { background-image: url('/img/room-card-purple.png'); }
.room-item[data-color="green"]  { background-image: url('/img/room-card-green.png'); }
.room-item[data-color="red"]    { background-image: url('/img/room-card-red.png'); }
.room-item:hover { transform: translateY(-3px) scale(1.03); }
.room-item .room-inner {
  position: absolute;
  /* 贴合图标中间的方框（6 宫格区域）位置 */
  left: 27%; top: 42%; width: 46%; height: 27%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; gap: 2px;
  padding: 4px 10px; box-sizing: border-box;
  overflow: hidden;
}
.room-item h3 {
  margin: 0; font-family: 'LeeeafHei','ZCOOL KuaiLe',sans-serif;
  font-size: 18px; line-height: 1.1; color: #000;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 100%;
}
.room-item .code {
  font-family: 'LeeeafHei','Caveat',monospace; font-size: 14px; color: #000;
  letter-spacing: 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.room-item .hint {
  font-size: 11px; color: #000;
  font-family: 'LeeeafHei','Caveat',sans-serif;
}

/* 房间颜色选择器（创建弹窗 + 房间页换色） */
.color-picker { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; align-items: center; }
.color-picker .swatch {
  width: 42px; height: 42px; padding: 0;
  background-image: none;
  border: 2.5px solid var(--ink);
  border-radius: 50%;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.color-picker .swatch:hover { transform: translateY(-2px) scale(1.05); }
.color-picker .swatch.active {
  box-shadow: 0 0 0 3px rgba(31,31,31,.22);
  transform: scale(1.12);
}
.color-picker .swatch[data-color="yellow"] { background-color: #f1d97a; }
.color-picker .swatch[data-color="red"]    { background-color: #e9b3b3; }
.color-picker .swatch[data-color="blue"]   { background-color: #cde0e7; }
.color-picker .swatch[data-color="green"]  { background-color: #c7dcb5; }
.color-picker .swatch[data-color="purple"] { background-color: #dcc4e4; }

.row { display: flex; gap: 10px; align-items: center; }
.row > * { flex: 1; }

/* ========== 响应式适配 ========== */
@media (max-width: 768px) {
  .diary-page, .room-page { padding: 12px; }
  .diary-head { padding: 10px 12px; }
  .diary-head .date { font-size: 22px; gap: 8px; }
  .weather { gap: 4px; }
  .weather span img { width: 26px; height: 26px; }
  .grid { padding: 12px; gap: 10px; }
  .bottom-tip { padding: 10px 12px 22px; gap: 10px; }
  .bottom-tip .avatar-circle { width: 40px; height: 40px; flex: 0 0 40px; font-size: 20px; }
  .bottom-tip .bubble { padding: 10px 78px 10px 12px; font-size: 15px; min-height: 60px; }
  .bottom-tip .bubble-save { right: 8px; bottom: 8px; padding: 3px 12px; font-size: 13px; }
  .room-title { font-size: 18px; padding: 5px 16px; }
  .message-board { padding: 12px; gap: 8px; }
  .message-board .label-img { width: 60px; }
  .msg-input { min-width: 100%; }
  .timeline24 .hours-col { width: 44px; flex: 0 0 44px; }
  .timeline24 .hours-col .h { padding-right: 6px; }
  .timeline24 .tracks-col .polaroid { width: 86px; }
  .timeline24 .tracks-col .sticky { width: 110px; font-size: 11px; }
}
@media (max-width: 600px) {
  .topbar { padding: 8px 12px; }
  .topbar .logo img { height: 42px; }
  .topbar nav { gap: 8px; }
  .topbar nav a:has(.nav-ico) { width: 48px; height: 48px; }
  .topbar nav a { width: 38px; height: 38px; }
  .grid { grid-template-columns: 1fr; }
  .timeline { grid-template-columns: 50px 1fr; padding: 10px; }
  .cell.has-photo { padding-right: 12px; }
  .cell .polaroid-ro { position: static; transform: none; width: 70%; margin: 6px auto 0; }
  .diary-head { justify-content: center; }
  .weather { justify-content: center; width: 100%; }
  .rooms-grid.with-roads .road-strip { height: 60px; margin: -30px 0 12px; }
  .modal { padding: 16px; }
  .modal h3 { font-size: 22px; }
}
@media (max-width: 420px) {
  .weather span img { width: 22px; height: 22px; }
  .diary-head .date { font-size: 18px; }
  .diary-head .date button { font-size: 16px; }
  .room-head { font-size: 20px; padding: 10px; }
  .room-head button { font-size: 16px; }
  .hour-bar { font-size: 18px; padding: 8px; }
}
