/* Album (Kỷ niệm, Album board): the tabs, the kitchen panel and polaroids, answers side by side, the two letter
   columns, and the dialogs. Sizes follow source/build_album.py, with text at 11 px or more. */

/* ---------------------------------------------------------------- header tabs */
.al-tabs { display: flex; gap: 4px; padding: 3px; background: var(--card); border: 2px solid var(--ink); border-radius: 20px; }
.al-tabs > button { height: 30px; padding: 0 12px; border-radius: 15px; border: 2px solid transparent; background: transparent; color: var(--ink); font-size: 13px; font-weight: 800; white-space: nowrap; display: flex; align-items: center; gap: 4px; }
.al-tabs > button.on { background: var(--honey); border-color: var(--ink); }
.al-tabs .n { font-size: 11px; font-weight: 700; color: var(--muted); }
.al-lab { font-size: 11px; font-weight: 800; letter-spacing: 0.04em; color: var(--label); } /* a label with a nickname in it: never re-cased */
.al-soft { font-size: 12px; font-weight: 700; color: var(--muted); line-height: 1.2; }

/* ---------------------------------------------------------------- Our dishes: the kitchen panel */
.al-stats { position: absolute; left: 48px; top: 60px; width: 226px; bottom: 21px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.al-stats .hd { display: flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 800; flex: none; }
.al-who, .al-loved { display: flex; align-items: center; gap: 8px; flex: none; }
.al-who .tx, .al-loved .tx { flex: 1; min-width: 0; line-height: 1.1; }
.al-who b, .al-who small, .al-loved b, .al-loved small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.al-who b { font-size: 12px; font-weight: 800; }
.al-loved b { font-size: 13px; font-weight: 800; }
.al-who small, .al-loved small { font-size: 11px; font-weight: 700; color: var(--muted); }
.al-who .num { font-size: 24px; font-weight: 800; flex: none; }
.al-loved .thumb { width: 44px; height: 32px; flex: none; border-radius: 8px; border: 1.5px solid var(--ink); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.al-rule { border-top: 2px dashed #D8CDBB; flex: none; }
.al-month { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 800; line-height: 1.15; flex: none; }
.al-month svg { flex: none; }
.al-tried { margin-top: auto; display: flex; flex-direction: column; gap: 4px; flex: none; }
.al-tried .row { justify-content: space-between; font-size: 11px; font-weight: 800; }
.al-bar { height: 9px; border-radius: 5px; background: #FFFFFF; border: 1.5px solid var(--ink); overflow: hidden; }
.al-bar i { display: block; height: 100%; background: var(--honey); }

/* ---------------------------------------------------------------- Our dishes: filters and polaroids */
.al-filters { position: absolute; left: 288px; right: 16px; top: 60px; display: flex; align-items: center; gap: 6px; }
.al-chip { flex: none; height: 36px; padding: 0 12px; border-radius: 14px; border: 2px solid var(--ink); background: var(--card); color: var(--ink); font-size: 12px; font-weight: 800; white-space: nowrap; }
.al-chip > span { display: block; max-width: 110px; overflow: hidden; text-overflow: ellipsis; }
.al-chip.on { background: var(--ink); color: var(--card); }
.al-order { margin-left: auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 11px; font-weight: 700; color: var(--label); }
/* the grid scrolls; its padding leaves room for the tilt and the tape */
.al-grid { position: absolute; left: 284px; right: 12px; top: 89px; bottom: 21px; padding: 8px 4px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px 14px; align-content: start; }
.al-pol { position: relative; min-width: 0; display: flex; flex-direction: column; gap: 3px; padding: 6px 6px 7px; background: #FFFFFF; border: 2px solid var(--ink); border-radius: 6px; box-shadow: var(--edge); color: var(--ink); text-align: left; transform: rotate(var(--r, 0deg)); }
.al-pol:active { transform: rotate(var(--r, 0deg)) translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.al-pol .tape, .al-big .tape { position: absolute; top: -7px; left: 50%; margin-left: -17px; width: 34px; height: 11px; transform: rotate(var(--tr, 0deg)); }
.al-pol .pic, .al-big .pic { position: relative; display: flex; align-items: center; justify-content: center; height: 60px; border-radius: 4px; border: 1.5px solid var(--ink); overflow: hidden; }
.al-pol .pic.live { border-style: dashed; }
.al-pol .pic img, .al-big .pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.al-pol .nm { display: block; font-size: 13px; font-weight: 800; line-height: 1.1; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.al-pol .meta { display: flex; justify-content: space-between; gap: 2px; font-size: 11px; font-weight: 700; color: var(--muted); line-height: 1.1; white-space: nowrap; }
.al-pol .meta > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.al-pol .status { display: block; font-size: 11px; font-weight: 800; color: #B8862A; line-height: 1.15; }
.al-new { position: absolute; top: -8px; right: -8px; padding: 1px 6px; border-radius: 9px; background: var(--alert); color: #FFFFFF; border: 2px solid var(--ink); font-size: 11px; font-weight: 800; line-height: 14px; }
.al-addph { position: absolute; right: 4px; bottom: 4px; display: flex; align-items: center; gap: 3px; padding: 1px 6px; border-radius: 8px; background: var(--card); border: 1.5px solid var(--ink); font-size: 11px; font-weight: 800; line-height: 1.2; white-space: nowrap; }
.al-none { grid-column: 1 / -1; margin-top: 20px; padding: 34px 20px; text-align: center; border: 2px dashed #C9BBA6; border-radius: 14px; font-size: 14px; font-weight: 800; color: var(--muted); }

/* ---------------------------------------------------------------- a tab with nothing in it yet */
.al-empty { position: absolute; left: 48px; right: 16px; top: 60px; bottom: 21px; display: flex; align-items: center; gap: 34px; padding: 0 44px; }
.al-empty .art { position: relative; width: 250px; height: 250px; flex: none; }
.al-ghost { position: absolute; width: 104px; height: 118px; border: 2px dashed #C9BBA6; border-radius: 6px; background: rgba(255, 255, 255, 0.5); }
.al-empty .bowl { position: absolute; left: 30px; top: 60px; width: 190px; height: 130px; display: flex; align-items: center; justify-content: center; }
.al-empty .copy { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.al-empty h2 { margin: 0; font-size: 26px; font-weight: 800; line-height: 1.05; }
.al-empty .q { font-size: 24px; font-weight: 800; line-height: 1.1; }
.al-empty p { margin: 0; font-size: 14px; font-weight: 700; line-height: 1.35; color: #4A423B; }
.al-cta { height: 42px; font-size: 15px; border-radius: 21px; }
.al-chat { width: 250px; flex: none; max-height: calc(100% - 28px); display: flex; flex-direction: column; gap: 10px; padding: 2px; }
.al-crow { max-width: 100%; display: flex; align-items: flex-end; gap: 6px; flex: none; }
.al-crow.l { align-self: flex-start; }
.al-crow.r { align-self: flex-end; }
.al-crow.c { align-self: center; }
.al-crow.r .react-badge { right: auto; left: 10px; } /* (a reaction on the corner toward the middle) */
.al-crow > .portrait { flex: none; }
.al-cb { min-width: 0; padding: 6px 12px; border-radius: 14px; border: 1.5px solid var(--ink); font-size: 13px; font-weight: 700; line-height: 1.3; white-space: pre-wrap; overflow-wrap: anywhere; display: flex; align-items: center; }
.al-cb.ghost { border: 2px dashed #C9BBA6; color: var(--label); background: transparent; }
/* a bubble and, under it, when it was written (owner, 6 Oct 2026) */
.al-said { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.al-crow.r .al-said, .al-ans.me .al-said { align-items: flex-end; }
.al-time { padding: 0 4px; font-size: 11px; font-weight: 700; line-height: 1.2; color: var(--label); white-space: nowrap; }

/* ---------------------------------------------------------------- Answers */
.al-answers { position: absolute; left: 48px; right: 16px; top: 60px; bottom: 21px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-content: start; padding-bottom: 4px; }
.al-q { min-width: 0; padding: 10px 12px; display: flex; flex-direction: column; gap: 7px; }
.al-q .wk { align-self: flex-start; padding: 1px 8px; border-radius: 9px; background: var(--honey); border: 1.5px solid var(--ink); font-size: 11px; font-weight: 800; }
.al-q .qq { font-size: 14px; font-weight: 800; line-height: 1.2; }
.al-ans { display: flex; align-items: center; gap: 8px; }
/* a chat (owner, 5 Oct 2026): yours on the right beside your face, each bubble as wide as its words */
.al-ans.me { flex-direction: row-reverse; }
.al-ans .al-said { flex: 0 1 auto; }
.al-ans .al-bub { flex: 0 1 auto; max-width: 100%; }
.al-ans.me .react-badge { right: auto; left: 10px; }
.al-bub { flex: 1; min-width: 0; padding: 5px 10px; border-radius: 12px; border: 1.5px solid var(--ink); font-size: 12px; font-weight: 700; line-height: 1.3; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.al-bub.turn { display: flex; align-items: center; gap: 6px; background: #FFF6D9; border-style: dashed; font-weight: 800; text-align: left; white-space: normal; }
.al-bub.turn > span { flex: 1; }
.al-bub.lock { display: flex; align-items: center; gap: 6px; background: #EFE9F7; color: var(--muted); white-space: normal; }
.al-bub.lock svg, .al-bub.turn svg { flex: none; }
.al-bub.wait { border: 2px dashed #C9BBA6; color: var(--label); white-space: normal; }

/* ---------------------------------------------------------------- Letters */
.al-cols, .al-first { position: absolute; left: 48px; right: 16px; top: 60px; bottom: 21px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.al-first { gap: 16px; }
.al-col { min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 8px; }
.al-col .hd { flex: none; display: flex; align-items: center; gap: 6px; height: 20px; font-size: 13px; font-weight: 800; white-space: nowrap; }
.al-col .hd svg { flex: none; }
.al-col .hd .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.al-col .hd .n { font-size: 11px; color: var(--label); }
.al-list { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 8px; padding-bottom: 4px; }
.al-letter { flex: none; height: 84px; padding: 6px 12px 6px 8px; display: flex; align-items: center; gap: 10px; text-align: left; color: var(--ink); }
.al-letter > svg { flex: none; }
.al-letter .tx, .al-write .tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; line-height: 1.15; }
.al-letter .top { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.al-letter .ti, .al-letter .wh, .al-letter .sb { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.al-letter .ti { font-size: 14px; font-weight: 800; min-width: 0; }
.al-letter .wh { font-size: 12px; font-weight: 800; }
.al-letter .sb { font-size: 11px; font-weight: 700; color: var(--muted); }
.al-letter .sb.quote { font-style: italic; }
.al-letter .sb.now { color: #B55A3C; font-weight: 800; }
.al-tag { flex: none; display: flex; align-items: center; gap: 3px; padding: 0 7px; border-radius: 9px; border: 1.5px solid var(--ink); background: #FFFFFF; font-size: 11px; font-weight: 800; line-height: 16px; white-space: nowrap; }
.al-tag.sealed { background: var(--honey); }
.al-write { flex: none; height: 64px; border: 2px dashed #B8AA95; border-radius: 14px; display: flex; align-items: center; gap: 10px; padding: 0 12px; background: transparent; color: var(--muted); text-align: left; }
.al-write b { font-size: 13px; font-weight: 800; color: var(--ink); }
.al-write small { font-size: 11px; font-weight: 700; }
.al-plus { width: 38px; height: 38px; flex: none; border-radius: 19px; background: var(--card); border: 2px solid var(--ink); color: var(--ink); display: flex; align-items: center; justify-content: center; }
.al-plus.big { width: 46px; height: 46px; border-radius: 23px; }
.al-wel { min-height: 0; padding: 18px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; }
.al-wel.dash { border: 2px dashed #B8AA95; border-radius: 14px; color: var(--muted); }
.al-wel h3 { margin: 0; font-size: 18px; font-weight: 800; color: var(--ink); line-height: 1.15; }
.al-wel .s { font-size: 12px; font-weight: 700; color: var(--muted); line-height: 1.3; }
.al-pill { display: flex; align-items: center; gap: 4px; padding: 1px 10px; border-radius: 10px; border: 1.5px solid var(--ink); background: #FFFFFF; font-size: 11px; font-weight: 800; color: var(--ink); }
.al-pill.sealed { background: var(--honey); }

/* ---------------------------------------------------------------- dialogs */
.al-dim { position: absolute; inset: 0; background: rgba(43, 38, 34, 0.35); border: none; padding: 0; animation: fadeIn .18s ease-out both; }
.al-dialog { position: absolute; background: var(--card); border: 2px solid var(--ink); border-radius: 18px; box-shadow: var(--edge); color: var(--ink); animation: alIn .22s cubic-bezier(.2, .9, .3, 1) both; }
@keyframes alIn { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .al-dialog { animation: fadeIn .15s both; } }
.al-x { width: 32px; height: 32px; flex: none; border-radius: 16px; background: #FFFFFF; border: 2px solid var(--ink); color: var(--ink); display: flex; align-items: center; justify-content: center; padding: 0; }
.al-dialog .mt { font-size: 12px; font-weight: 700; color: var(--muted); line-height: 1.25; }
.al-dialog .foot { display: flex; justify-content: flex-end; gap: 8px; }
/* a dish */
.al-dish { left: 150px; top: 44px; width: 560px; height: 300px; padding: 16px; display: flex; gap: 16px; }
.al-big { position: relative; width: 210px; flex: none; align-self: flex-start; padding: 8px 8px 30px; background: #FFFFFF; border: 2px solid var(--ink); border-radius: 6px; box-shadow: var(--edge); transform: rotate(-1.5deg); }
.al-big .tape { top: -8px; margin-left: -22px; width: 44px; height: 13px; background: rgba(242, 201, 76, 0.75); transform: rotate(3deg); }
.al-big .pic { height: 150px; }
.al-big .cap { position: absolute; left: 6px; right: 6px; bottom: 8px; text-align: center; font-size: 13px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.al-dish .side { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 8px; }
.al-dish .top { flex: none; display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.al-dish .top .tx { min-width: 0; }
.al-dish .nm { font-size: 22px; font-weight: 800; line-height: 1.1; }
.al-dish .hearts { flex: none; }
.al-note { flex: 0 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; background: #FFF6D9; border: 1.5px solid var(--ink); border-radius: 4px; transform: rotate(0.6deg); }
.al-note .tx { min-height: 0; font-size: 14px; font-weight: 700; line-height: 1.25; white-space: pre-wrap; overflow-wrap: anywhere; }
.al-dish .foot { margin-top: auto; flex: none; }
.al-dish .foot .grow { flex: 1; }
/* a letter read again */
.al-read { left: 132px; top: 20px; width: 596px; height: 348px; padding: 12px 16px 14px; display: flex; flex-direction: column; gap: 8px; }
.al-read .head { flex: none; display: flex; align-items: center; gap: 10px; }
.al-read .head > svg { flex: none; }
.al-read .head .tx { flex: 1; min-width: 0; line-height: 1.1; }
.al-read .fr { font-size: 17px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.al-read .mt { font-size: 11px; }
.al-paper { flex: 1; min-height: 0; padding: 6px 20px; border-radius: 6px; border: 1.5px solid var(--ink); background-color: #FFFFFF; background-image: repeating-linear-gradient(transparent 0 25px, #EFE5D6 25px 26px), var(--pp, none); background-size: auto, var(--pps, auto); background-attachment: local; font-size: 15px; font-weight: 700; line-height: 26px; }
.al-paper .dr, .al-paper .sg { font-weight: 800; }
.al-paper .bd { white-space: pre-wrap; overflow-wrap: anywhere; }
.al-paper .sg { text-align: right; }
.al-read .foot .btn { height: 38px; }
/* a letter still sealed */
.al-sealed { left: 212px; top: 40px; width: 420px; height: 310px; padding: 14px 22px 16px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.al-sealed .corner { position: absolute; right: 12px; top: 12px; }
.al-sealed > svg { flex: none; }
.al-sealed .ti { font-size: 19px; font-weight: 800; line-height: 1.15; }
.al-sealed .wh { font-size: 14px; font-weight: 800; line-height: 1.15; }
.al-sealed p { margin: 4px 0 0; font-size: 12px; font-weight: 700; color: var(--muted); line-height: 1.3; }
.al-sealed .btn { margin-top: auto; height: 38px; }
