/* Dialog paper, ink and focus styles used across the playground. */
.mochi-dialog {
  --sheet-paper: #fffaf6;
  --sheet-tint: #f9e6e9;
  --sheet-rim: #ddb6c2;
  --sheet-ink: #583646;
  --sheet-action: #9d3a5b;
  --sheet-stitch: #d5aaba;
  padding: 0;
  scrollbar-gutter: auto;
  overscroll-behavior: contain;
  scroll-padding: 70px 0 24px;
}
.mochi-dialog:not(.chat-dialog) {
  background: var(--sheet-paper);
  border: 1px solid #b88d9d;
  border-radius: 21px;
  box-shadow: 0 3px 0 #b991a1, 0 15px 52px #391c3438;
}
.mochi-dialog[data-sheet=walk],.mochi-dialog[data-sheet=walkInvite],.mochi-dialog[data-sheet=photo] {
  --sheet-tint: #e5f1e8; --sheet-rim: #b6cfbf; --sheet-stitch: #9cbca7; --sheet-action: #3d6c56;
}
.mochi-dialog[data-sheet=game],.mochi-dialog[data-sheet=notices] {
  --sheet-tint: #f0eaf9; --sheet-rim: #d0bedb; --sheet-stitch: #b9a4cb; --sheet-action: #6e4c87;
}
.mochi-dialog[data-sheet=shop],.mochi-dialog[data-sheet=event] {
  --sheet-tint: #fff1d9; --sheet-rim: #dfc7a6; --sheet-stitch: #cfb18c; --sheet-action: #86512e;
}
.mochi-dialog:not(.chat-dialog) .mf-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px clamp(14px,4vw,22px);
  background: var(--sheet-tint);
  border-bottom: 1px solid var(--sheet-rim);
  color: var(--sheet-ink);
}
.mochi-dialog[data-sheet]:not(.chat-dialog) .mf-bar>span {
  display: inline-flex; align-items: center; gap: 9px; font-size: .98rem;
}
.mochi-dialog[data-sheet]:not(.chat-dialog) .mf-bar>span::before {
  content: ''; width: 18px; height: 18px; flex: none; image-rendering: pixelated;
  background: url('/art/tab-strawberry-64.png') center / contain no-repeat;
}
.mochi-dialog:not(.chat-dialog) .mf-bar>button:not(.mf-back),#quote-postcard form button {
  display: grid; place-content: center; padding: 0; min-width: 40px; min-height: 40px;
  border: 1px solid var(--sheet-rim,#d8b6c0); border-radius: 13px; background: #fffdf9;
  color: #71485b; font-size: 1.22rem; font-weight: 650; line-height: 1;
}
.mochi-dialog:not(.chat-dialog) .mf-bar>button:not(.mf-back):hover,#quote-postcard form button:hover {background: #fff6f8}
.mochi-dialog :is(a,button,summary,input,textarea,select):focus-visible,
#quote-postcard :is(a,button):focus-visible,.welcome-note button:focus-visible {
  outline: 3px solid #88547b; outline-offset: 3px;
}
.mochi-dialog:not(.chat-dialog) .mf-content {padding: clamp(16px,4vw,25px)}
.mochi-dialog:not(.chat-dialog) .mf-content>.mf-loader {color: #795f70}
.mochi-dialog[data-sheet]:not(.chat-dialog) .mf-content>h2 {color: #533347; letter-spacing: -.045em; margin-bottom: 14px}
.mochi-dialog[data-sheet] .mf-content>h2:has(+.my-mochi-village) {margin-bottom: 6px}
.mochi-dialog .mf-actions .mf-btn {min-height: 42px; line-height: 1.35}
.mochi-dialog:not(.chat-dialog) .mf-btn.primary {
  background: var(--sheet-action); border-color: var(--sheet-action); color: white;
  box-shadow: 0 2px 0 color-mix(in srgb,var(--sheet-action),#382335 22%);
}
.mochi-dialog:not(.chat-dialog) .mf-btn.primary:active:enabled {box-shadow: none; transform: translateY(1px)}
.mochi-dialog .mf-status:not(:empty) {padding: 10px 18px; line-height: 1.5}

/* Each invitation pairs one pixel illustration with the action it unlocks. */
.mochi-dialog .entry-card {
  margin: 16px 0 6px;
  border: 1px solid var(--sheet-rim); border-radius: 17px;
  background: #fffdf9; overflow: hidden;
}
.entry-note {display: flex; align-items: center; gap: clamp(12px,3vw,20px); padding: clamp(14px,3.5vw,21px)}
.entry-art {
  flex: 0 0 auto; display: grid; place-items: center; width: clamp(50px,11vw,65px); aspect-ratio: 1;
  background: radial-gradient(circle,#ffffffa8 1px,transparent 1.4px) 0 0/6px 6px,var(--sheet-tint);
  border: 1px dashed var(--sheet-stitch); border-radius: 17px 17px 22px 17px;
}
.entry-art img {width: 79%; height: 79%; object-fit: contain; image-rendering: pixelated}
.mochi-dialog p.entry-copy {flex: 1; min-width: 0; margin: 0; font-size: 1rem; line-height: 1.62; color: #50394a}
.entry-card>.mf-actions {
  align-items: stretch; gap: 9px; margin: 0; padding: 13px clamp(14px,3.5vw,21px);
  background: color-mix(in srgb,var(--sheet-tint) 29%,#fffcfa);
  border-top: 1px dashed var(--sheet-stitch);
}
.entry-card>.mf-actions .mf-btn {margin: 0; padding: 10px 15px; border-radius: 12px; flex: 1 1 auto}
.entry-card>.mf-actions .mf-btn:not(.primary) {background: #fff; color: var(--sheet-ink); border-color: var(--sheet-rim)}
.mochi-dialog[data-viewer=guest]:is([data-sheet=login],[data-sheet=signup]) .mf-content>h2 {position: relative; padding-inline-end: 62px; min-height: 48px; align-content: center}
.mochi-dialog[data-viewer=guest]:is([data-sheet=login],[data-sheet=signup]) .mf-content>h2::after {
  content: ''; position: absolute; right: 1px; top: 0; width: 51px; height: 47px;
  background: url('/art/bunny.png') center/contain no-repeat; image-rendering: pixelated;
}
.mochi-dialog .mf-auth-switch {padding: 4px; border: 1px solid #e8cdd5; border-radius: 15px; background: #f8e9ed}
.mochi-dialog .mf-auth-switch button[aria-pressed=true] {color: #82334f; border-radius: 11px; box-shadow: 0 1px 4px #79455e33}
.mochi-dialog :is(form[data-form=demoLogin],form[data-form=signup])>label {display: grid;gap: 5px;color: #654452}
.mochi-dialog :is(form[data-form=demoLogin],form[data-form=signup])>label input {background: #fffdfc; min-height: 44px}
.mochi-dialog .mf-choice label:has(input:checked) {box-shadow: 0 0 0 1px #af5373}
.mochi-dialog .mf-auth-switch+.mf-note {line-height: 1.55}
.mochi-dialog .mf-notice-link {display: grid; grid-template-columns: 36px minmax(0,1fr); align-items: start; gap: 4px 12px; text-decoration: none}
.mf-notice-link .notice-art {width: 36px;height: 36px;object-fit: contain;grid-row: span 2;image-rendering: pixelated}
.mf-notice-link>.notice-action {justify-self: start;font-size: .8rem;line-height: 1.4}
.mochi-dialog .mf-cover {border-color: var(--sheet-rim)}
.mochi-dialog .install-status,.mochi-dialog .install-menu,.mochi-dialog .install-icon {line-height: 1.45}
.install-guide .mf-content>h2 {margin-top: 9px}
#quote-postcard {overscroll-behavior: contain;scroll-padding-block: 14px;border-color: #c797a9}
#quote-postcard .postcard-actions button {border-radius: 12px}
#toast:has(.welcome-note) {
  width: min(410px,calc(100vw - 32px)); max-width: calc(100vw - 32px); padding: 0;
  color: #503747; border: 1px solid #cfa6b5; border-radius: 17px;
  box-shadow: 0 3px 0 #dabec7,0 8px 28px #57344725; background: #fffbf5;
}
.welcome-note {display: grid; grid-template-columns: 45px minmax(0,1fr) 32px; align-items: center; gap: 9px; padding: 12px}
.welcome-note img {width: 45px; image-rendering:pixelated}
.welcome-note p {margin: 0 0 4px; line-height: 1.55; font-size: .9rem}
#toast .welcome-join {color: #903655; text-decoration: underline; text-underline-offset: .16em; min-height: 32px}
#toast .welcome-close {align-self: start; border: 1px solid #e5cbd5; border-radius: 9px; width: 32px; height: 32px; background: white; color:#764b60}
@media(max-width:440px){
  .mochi-dialog {max-height: calc(100dvh - max(16px,env(safe-area-inset-top)) - max(12px,env(safe-area-inset-bottom)))}
  .mochi-dialog:not(.chat-dialog) {width: calc(100vw - 20px)}
  .mochi-dialog:not(.chat-dialog) .mf-content>h2 {font-size: clamp(1.4rem,6.5vw,1.78rem); line-height: 1.3}
  .entry-note {align-items: flex-start}
  .entry-card>.mf-actions .mf-btn {min-height: 44px}
  .mochi-dialog:not(.chat-dialog) .mf-bar>button {min-height: 44px; min-width: 44px}
  .mochi-dialog .mf-notice-link {gap: 4px 9px}
}

/* The bell keeps device controls apart from incoming invitations and village news. */
.mochi-dialog[data-sheet=notices]{width:min(31rem,calc(100vw - 1.5rem))}
.notice-settings{position:relative;padding:16px;border:1px solid #d5bdcf;border-radius:18px;background:linear-gradient(130deg,#fff4ec,#f8edf7 78%);box-shadow:0 3px 0 #eadbe1}
.notice-identity{display:flex;align-items:center;gap:12px}
.notice-mascot{display:grid;place-items:center;flex:0 0 58px;height:58px;border:1px dashed #ca9cab;border-radius:17px;background:radial-gradient(#f2d8db 1px,transparent 1.2px) 0 0/7px 7px,#fff9f2}
.notice-mascot img{width:42px;height:42px;object-fit:contain;image-rendering:pixelated}
.notice-settings h3,.notice-section h3{margin:0;color:#573748;font-size:1rem}
.device-state{display:inline-flex;align-items:center;gap:6px;color:#765666;font-size:.85rem;font-weight:650;margin-top:3px}
.device-state::before{content:'';width:8px;height:8px;border-radius:50%;background:#bd8f78}
.device-state.connected::before{background:#41846d}
.notice-controls{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}
.notice-controls>.mf-btn{flex:1 1 8rem;min-height:44px;margin:0}
.notice-controls .notice-guide-link{color:#674659;background:#fffdfb;border-color:#ccacbb}
.notice-settings .notice-disable{display:block;margin:9px 0 -4px auto;min-height:36px;padding:4px 6px;background:transparent;color:#755866;border:0;box-shadow:none;font-size:.84rem;text-decoration:underline;text-underline-offset:3px}
.notice-section{padding:15px 0 0;margin-top:14px;border-top:1px dashed #dbc4cf}
.notice-section h3{margin-bottom:9px}
.notice-section .notice-empty,.notice-board article{padding:12px 14px;margin:0;border-radius:12px;background:#f5efeb;color:#6a515c;font-size:.92rem;line-height:1.6}
.notice-board article{background:#f5f0f9}
.notice-board article+article,.notice-row+.notice-row{margin-top:6px}
.notice-board article p{margin:3px 0 0}
.notice-row{padding:11px;border:1px solid #e7d4de;background:#fffdfb;border-radius:14px}
.notice-row b{line-height:1.45;overflow-wrap:anywhere;color:#5d4053}
.push-welcome .push-guide-bar{position:sticky;top:0;z-index:2;display:flex;align-items:center;gap:8px;padding:9px clamp(12px,4vw,20px);background:#fff6f4;border-bottom:1px solid #e8cdd5}
.push-guide-bar h2{flex:1;min-width:0;line-height:1.35}
.push-welcome .guide-close{flex:0 0 44px;width:44px;height:44px;display:grid;place-items:center;padding:0;font-size:1.5rem;line-height:1;color:#71485b;background:#fffdf9;border:1px solid #d8b6c0;border-radius:13px;cursor:pointer}
.push-welcome .guide-close:hover{background:#ffe8ef}

.notice-entry{margin-block:6px}
.notice-entry .notice-row,.notice-entry article{position:relative;padding-top:1.65rem}
.notice-entry .mf-chat-time{position:absolute;top:.38rem;right:.72rem;font-size:.75rem;color:#78566a}
.notice-more summary{width:fit-content;margin:9px auto;padding:6px 14px;border:1px solid #e7bdcc;border-radius:18px;background:#fff3f7;color:#80405c;cursor:pointer;font-weight:650}
.notice-feed .notice-empty[hidden]{display:none}

.native-popup-back{cursor:pointer;color:#713852;background:#fff8fb;border:1px solid #ddb6c2;border-radius:12px;padding:7px 10px;font:inherit;font-size:.85rem}

.mochi-dialog[data-sheet="walk"]:not(.chat-dialog) .mf-bar > .walk-fold {
  flex: none; padding: 0 .55rem; min-height: 36px; min-width: 50px;
  border-radius: 10px; border-color: #adc8b5; background: #f4faf2;
  color: #365c48; font-size: .75rem; font-weight: 700; white-space: nowrap;
}
.mochi-dialog[data-sheet="walk"]:not(.chat-dialog) .mf-bar > .walk-fold:hover {background: #e3f3e8}
.talk-head .talk-members {
  margin-left: auto; flex: none; min-height: 40px; padding: .35rem .7rem;
  border: 1px solid #dac5e3; border-radius: 12px; background: #f9f2ff;
  color: #624979; font-size: .8rem; font-weight: 750; cursor: pointer;
}
.talk-member-list {list-style: none; padding: 0; margin: .6rem 0; display: grid; gap: .48rem}
.talk-member-list button {
  width: 100%; min-height: 48px; padding: .45rem .65rem; display: grid;
  grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: .6rem;
  text-align: left; overflow-wrap: anywhere; border: 1px solid #e0cce8;
  border-radius: 13px; background: #fcf7ff; color: #614678; font-weight: 700; cursor: pointer;
}
.talk-member-list button:hover,.talk-head .talk-members:hover {background: #f1e7f8}
.talk-member-list small {margin-left: .3rem; color: #6c5578; font-weight: 550}
