/* 나의 메타버스 공간: one header bar, a small segmented menu, then the room or the social pages. */
.pr-entry{margin:14px 0;border:1px solid #e5e7eb;border-radius:16px;background:#fff;box-shadow:0 1px 3px #0f172a0f;overflow:hidden}
.pr-entry>summary{cursor:pointer;padding:12px 16px;font-size:16px;font-weight:800;color:#1f2937}
.pr-entry>summary small{margin-left:8px;font-size:13px;font-weight:400;color:#6b7280}
.mini-home{padding:12px 14px 0;background:#fff;color:#1f2937;font-size:14px;line-height:1.5}
.mini-home *{box-sizing:border-box}
.mini-home :where(button,input,textarea,select){font:inherit;font-size:14px;color:#1f2937;border:1px solid #d1d5db;border-radius:8px;padding:5px 10px;background:#fff;min-height:34px;max-width:100%}
.mini-home :where(button){cursor:pointer;font-weight:600;padding:4px 12px;transition:background .12s,border-color .12s,color .12s}
.mini-home :where(button:hover:not(:disabled)){background:#eef2ff;border-color:#a5b4fc;color:#3730a3}
.mini-home :where(button:disabled){opacity:.5;cursor:wait}
.mini-home :focus-visible{outline:2px solid #6366f1;outline-offset:2px}
.mini-home .mh-primary{background:#4f46e5;border-color:#4f46e5;color:#fff}
.mini-home .mh-primary:hover:not(:disabled){background:#4338ca;border-color:#4338ca;color:#fff}

/* Header bar */
.mh-cover{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:8px 12px;border-radius:12px;border:1px solid #e0e7ff;background:linear-gradient(100deg,#eef2ff,#faf5ff 55%,#fff7ed)}
.mh-avatar{display:block;flex:none;background-repeat:no-repeat;image-rendering:pixelated}
.mh-cover>.mh-avatar{width:34px;max-height:46px}
.mh-intro{flex:1 1 280px;min-width:0}
.mh-intro h2{margin:0;font-size:17px;font-weight:800;line-height:1.3;color:#1e1b4b}
.mh-meta{display:flex;align-items:center;flex-wrap:wrap;gap:5px;margin-top:3px;font-size:12px;color:#4b5563}
.mh-room-name{max-width:240px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;font-weight:700;color:#4338ca;margin-right:2px}
.mh-mood,.mh-counters,.mh-open{display:inline-flex;align-items:center;gap:3px;padding:0 8px;border-radius:999px;border:1px solid #e5e7eb;background:#ffffffcc;white-space:nowrap;line-height:20px}
.mh-counters strong{color:#4f46e5}.mh-counters b{color:#374151}
.mh-ico{font-size:11px}
.mh-open.is-open{color:#15803d;border-color:#bbf7d0;background:#f0fdf4}
.mh-bar-slot{display:flex;margin-left:auto}
.mh-bar-slot:empty{display:none}
.mh-bar-slot .pr-header{margin:0}
.mh-bar-slot .pr-title{display:none}
.mini-home:not([data-tab=home]) .mh-bar-slot{display:none}

/* Segmented menu */
.mh-nav{display:flex;align-items:center;gap:2px;width:fit-content;max-width:100%;margin-top:10px;padding:3px;border-radius:10px;background:#eceef3}
.mini-home .mh-nav button{min-height:30px;padding:3px 14px;border:0;border-radius:8px;background:transparent;color:#475569;font-size:13.5px;font-weight:700;white-space:nowrap}
.mini-home .mh-nav button:hover:not(:disabled){background:#ffffffb3;color:#1e293b}
.mini-home .mh-nav button[aria-pressed=true]{background:#fff;color:#3730a3;box-shadow:0 1px 2px #0000001f}
.mini-home .mh-nav .mh-refresh{padding:3px 10px;color:#64748b;font-size:15px}
.mh-badge{display:inline-block;margin-left:5px;padding:0 6px;border-radius:999px;background:#ef4444;color:#fff;font-size:11px;line-height:17px}
.mh-status{margin:8px 0 0;padding:6px 10px;border-radius:8px;background:#eef2ff;color:#3730a3;font-size:13px;overflow-wrap:anywhere}
.mh-status:empty{display:none}
.mh-status.is-error{background:#fef2f2;color:#b91c1c}
.mh-content{padding:10px 0 14px}
.mh-content:empty{display:none}
.mh-content>*+*{margin-top:10px}
.mini-home h3{margin:0 0 8px;font-size:15px;font-weight:800;color:#1f2937}
.mh-caption{display:block;margin:4px 0 0;font-size:12px;color:#6b7280;font-weight:400}
.mh-empty{grid-column:1/-1;margin:0;padding:12px;border-radius:10px;background:#f9fafb;color:#6b7280;font-size:13px;text-align:center}

/* Profile */
.mh-settings{display:grid;gap:12px;max-width:520px}
.mh-field{display:flex;flex-direction:column;gap:4px;font-size:13px;font-weight:700;color:#374151}
.mh-label{display:flex;justify-content:space-between;align-items:baseline;gap:8px}
.mini-home .mh-field :is(input,textarea,select){font-weight:400;width:100%}
.mini-home textarea{resize:vertical}
.mh-counter{font-size:12px;font-weight:400;color:#9ca3af}
.mh-sharing{display:flex;align-items:flex-start;gap:10px;padding:10px 12px;border:1px solid #e5e7eb;border-radius:10px;background:#f9fafb;cursor:pointer}
.mh-sharing>span{display:flex;flex-direction:column}
.mini-home .mh-sharing input{flex:none;width:18px;height:18px;min-height:18px;margin:2px 0 0;padding:0;accent-color:#4f46e5}
.mini-home .mh-settings>.mh-primary{justify-self:start;min-width:140px}

/* Friends */
.mh-friend-top{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:10px}
.mh-card,.mh-guestbook{padding:12px;border:1px solid #e5e7eb;border-radius:12px;background:#fff}
.mh-inline{display:flex;gap:6px;margin-top:6px}
.mh-inline>input,.mh-inline>select{flex:1;min-width:0}
.mh-inline>button{flex:none}
.mh-letter{display:flex;align-items:center;gap:6px;margin-top:6px;padding:6px 8px;border-radius:8px;background:#f8fafc}
.mh-letter>span{flex:1;min-width:0;font-size:13px}
.mini-home .mh-letter button{min-height:30px;padding:2px 10px;font-size:13px}
.mh-friends{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:8px}
.mh-friend{display:flex;align-items:center;gap:10px;padding:8px 10px;border:1px solid #e5e7eb;border-radius:10px;background:#fff}
.mh-friend>.mh-avatar{width:32px;max-height:44px}
.mh-friend-text{flex:1;min-width:0}
.mh-friend-text small{display:block;font-size:12px;color:#6b7280;line-height:1.3}
.mh-friend h4{margin:0;font-size:14px;line-height:1.35;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mini-home .mh-friend button{flex:none;min-height:30px;padding:2px 12px;font-size:13px}
.mh-stickers{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:6px}
.mh-sticker{padding:8px 10px;border-radius:10px;background:#fffbeb;border:1px solid #fde68a;overflow-wrap:anywhere}
.mh-sticker:nth-child(3n+2){background:#f0fdf4;border-color:#bbf7d0}
.mh-sticker:nth-child(3n){background:#fdf2f8;border-color:#fbcfe8}
.mh-sticker strong{display:block;font-size:13px;color:#374151}
.mh-sticker small{display:block;margin-top:2px;font-size:11px;color:#6b7280}

/* Visiting a friend */
.mh-visit-heading{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.mini-home .mh-back{border-color:transparent;background:transparent;color:#4f46e5;padding:4px 8px}
.mini-home .mh-back:hover:not(:disabled){background:#eef2ff;border-color:#c7d2fe;color:#3730a3}
.mh-visit-title{min-width:0}
.mh-visit-title small{display:block;font-size:12px;color:#6b7280}
.mh-visit-title h3{margin:0;font-size:17px;overflow-wrap:anywhere}
.mh-visitor-room{max-width:860px;margin-inline:auto}
.mh-reactions{display:flex;justify-content:center;flex-wrap:wrap;gap:8px}
.mini-home .mh-reactions button{border-radius:999px;border-color:#e5e7eb;background:#fff;color:#374151}
.mini-home .mh-reactions button:hover:not(:disabled){background:#fef3c7;border-color:#fcd34d;color:#92400e}

/* The room editor below the bar keeps the same white card. */
.pr-entry .personal-room{padding:10px 14px 14px}
.pr-entry .personal-room.pr-readonly{padding:0}

@media(max-width:600px){
 .pr-entry{margin:10px 0;border-radius:12px}
 .pr-entry>summary{padding:10px 12px}
 .pr-entry>summary small{display:block;margin:2px 0 0}
 .mini-home{padding:8px 8px 0}
 .mini-home :where(input,textarea,select){font-size:16px}
 .mh-cover{gap:8px 10px;padding:8px 10px}
 .mh-intro{flex-basis:200px}
 .mh-intro h2{font-size:16px}
 .mh-room-name{max-width:170px}
 .mh-bar-slot{width:100%;margin-left:0}
 .mh-bar-slot .pr-header,.mh-bar-slot .pr-head-actions{width:100%}
 .mh-bar-slot :is(.pr-save,.pr-expand){flex:1}
 .mh-nav{width:100%}
 .mini-home .mh-nav button{flex:1;padding:3px 6px;font-size:13px}
 .mini-home .mh-nav .mh-refresh{flex:none}
 .mh-inline{flex-wrap:wrap}
 .mh-inline>input,.mh-inline>select,.mh-inline>button{flex:1 1 100%}
 .mh-letter{flex-wrap:wrap}
 .mh-letter>span{flex-basis:100%}
 .mh-friends{grid-template-columns:1fr}
 .mh-stickers{grid-template-columns:repeat(2,minmax(0,1fr))}
 .pr-entry .personal-room{padding:8px 8px 12px}
}
@media(prefers-reduced-motion:reduce){.mini-home *{transition:none!important}}
