:root {
  color-scheme: light;
  --bg: #f7efe7;
  --paper: #fffaf5;
  --paper-2: #f4e4d6;
  --ink: #3d2a22;
  --muted: #806a60;
  --brown: #6d3f2a;
  --brown-dark: #4c2b1d;
  --cocoa: #936149;
  --cream: #f7d9b9;
  --rose: #d79c97;
  --sage: #9eaa8b;
  --good: #557a58;
  --bad: #9d5149;
  --border: rgba(77, 43, 29, .15);
  --shadow: 0 18px 44px rgba(72, 43, 29, .12);
  font-family: Inter, ui-rounded, "SF Pro Rounded", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body { margin: 0; min-height: 100vh; color: var(--ink); background:
  radial-gradient(circle at 15% 5%, rgba(255,255,255,.95), transparent 30%),
  radial-gradient(circle at 90% 25%, rgba(215,156,151,.18), transparent 28%), var(--bg); }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .48; }
.app-shell { min-height: 100vh; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; padding: 12px clamp(16px, 4vw, 46px); background: rgba(255,250,245,.86); backdrop-filter: blur(16px); border-bottom: 1px solid var(--border); }
.brand { display: flex; gap: 11px; align-items: center; padding: 0; border: 0; background: transparent; color: var(--ink); text-align: left; }
.logo-dot { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 15px; background: linear-gradient(145deg, var(--cream), #efbd91); box-shadow: inset 0 0 0 1px rgba(109,63,42,.12); font-size: 24px; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 16px; }
.brand small { color: var(--muted); margin-top: 2px; }
.top-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.status-pill, .turn-pill { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 7px 11px; border-radius: 999px; font-size: 12px; font-weight: 750; background: #eaded2; color: var(--brown-dark); border: 1px solid rgba(109,63,42,.1); }
.status-pill.good { background: #e0ebdc; color: #375a3a; }
.status-pill.bad { background: #f3dddd; color: #8a443f; }
.status-pill.subtle { background: #f2e9e1; }
.main { width: min(1180px, calc(100% - 28px)); margin: 0 auto; padding: clamp(24px, 5vw, 56px) 0 90px; }
.hero { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(280px,.75fr); gap: 22px; align-items: stretch; }
.hero-card, .panel, .lobby-card, .table-card { border: 1px solid var(--border); border-radius: 30px; background: rgba(255,250,245,.9); box-shadow: var(--shadow); }
.hero-card { padding: clamp(28px, 5vw, 58px); overflow: hidden; position: relative; background: linear-gradient(135deg, rgba(255,250,245,.98), rgba(246,226,208,.96)); }
.hero-card::after { content: "☕"; position: absolute; right: clamp(20px, 5vw, 60px); bottom: -18px; font-size: clamp(84px, 14vw, 160px); opacity: .11; transform: rotate(-8deg); }
.eyebrow { margin: 0 0 8px; letter-spacing: .12em; text-transform: uppercase; font-size: 11px; font-weight: 850; color: var(--cocoa); }
h1,h2,h3,p { margin-top: 0; }
h1 { max-width: 690px; margin-bottom: 16px; font-size: clamp(38px, 6vw, 72px); line-height: .98; letter-spacing: -.045em; }
h2 { font-size: clamp(27px, 4vw, 42px); letter-spacing: -.035em; margin-bottom: 10px; }
h3 { margin-bottom: 8px; }
.lead { max-width: 700px; color: var(--muted); font-size: clamp(16px, 2vw, 19px); line-height: 1.65; }
.muted { color: var(--muted); }
.tiny { font-size: 12px; }
.hero-actions, .actions-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.primary-btn, .secondary-btn, .ghost-btn, .danger-btn { border: 0; border-radius: 16px; min-height: 46px; padding: 11px 17px; font-weight: 800; transition: transform .16s ease, box-shadow .16s ease, opacity .16s ease; }
.primary-btn { color: #fff8f2; background: linear-gradient(135deg, var(--brown), var(--brown-dark)); box-shadow: 0 10px 22px rgba(77,43,29,.22); }
.secondary-btn { color: var(--brown-dark); background: #f1d5bb; }
.ghost-btn { color: var(--brown-dark); background: rgba(109,63,42,.08); border: 1px solid rgba(109,63,42,.12); }
.danger-btn { color: #8d3e38; background: #f3dedc; }
.primary-btn:not(:disabled):hover, .secondary-btn:not(:disabled):hover, .ghost-btn:not(:disabled):hover { transform: translateY(-1px); }
.side-stack { display: grid; gap: 18px; }
.panel { padding: 24px; }
.stat-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; }
.stat { padding: 16px; background: var(--paper-2); border-radius: 18px; }
.stat strong, .stat span { display:block; }
.stat strong { font-size: 25px; margin-bottom: 4px; }
.stat span { color: var(--muted); font-size: 12px; }
.section { margin-top: 28px; }
.section-title { display:flex; justify-content:space-between; align-items:end; gap:16px; margin-bottom:14px; }
.join-grid { display:grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap:18px; }
.lobby-card { padding: 24px; }
label { display:block; color:var(--muted); font-size:12px; font-weight:800; margin-top:14px; }
input { width:100%; margin-top:7px; min-height:48px; padding:12px 14px; border-radius:14px; border:1px solid var(--border); color:var(--ink); background:#fff; outline:none; }
input:focus { border-color: rgba(109,63,42,.42); box-shadow:0 0 0 4px rgba(109,63,42,.08); }
.code-input { text-transform: uppercase; letter-spacing: .16em; font-weight: 900; }
.lobby-layout { display:grid; grid-template-columns:minmax(0,1.15fr) minmax(270px,.55fr); gap:20px; }
.room-code { display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin: 15px 0 4px; }
.code-badge { font-size: clamp(30px,6vw,52px); font-weight:900; letter-spacing:.12em; }
.player-list { display:grid; gap:10px; margin-top:18px; }
.player-row { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:14px 15px; border:1px solid var(--border); border-radius:17px; background:#fffdf9; }
.player-main { display:flex; align-items:center; gap:10px; min-width:0; }
.avatar { width:38px; height:38px; flex:0 0 auto; display:grid; place-items:center; border-radius:13px; background:var(--paper-2); }
.player-name { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:850; }
.ready { color:var(--good); font-weight:850; }
.waiting { color:var(--muted); font-weight:800; }
.game-layout { display:grid; gap:18px; }
.table-card { overflow:hidden; }
.game-head { display:flex; justify-content:space-between; align-items:flex-start; gap:14px; padding:22px 24px; border-bottom:1px solid var(--border); }
.score-strip { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:9px; padding:14px 18px; background:#f6e8db; }
.score-card { padding:12px 13px; border-radius:15px; background:rgba(255,255,255,.76); border:1px solid rgba(109,63,42,.08); }
.score-card.active { outline:2px solid rgba(109,63,42,.35); background:#fff; }
.table-center { padding:28px 20px; background:linear-gradient(145deg,#77503c,#563322); color:#fff8f2; }
.table-center .eyebrow, .table-center .muted { color:#f5d7bd; }
.market { display:grid; grid-template-columns:repeat(5,minmax(118px,1fr)); gap:10px; overflow-x:auto; padding:4px 0 6px; }
.card { min-width:118px; min-height:155px; border:1px solid rgba(109,63,42,.15); border-radius:20px; padding:14px 10px; background:linear-gradient(160deg,#fffdf9,#f4ddc7); color:var(--ink); box-shadow:0 10px 24px rgba(43,24,16,.12); text-align:center; }
button.card { transition:transform .16s ease, box-shadow .16s ease; }
button.card:not(:disabled):hover { transform:translateY(-4px) rotate(-.4deg); box-shadow:0 15px 30px rgba(43,24,16,.18); }
.card .emoji { display:block; font-size:42px; margin:6px 0 14px; }
.card strong { display:block; }
.card small { display:block; margin-top:7px; color:var(--muted); }
.player-zone { padding:22px 24px 26px; }
.zone-grid { display:grid; grid-template-columns:minmax(0,1fr) minmax(270px,.58fr); gap:18px; }
.hand { display:flex; gap:9px; overflow-x:auto; padding:4px 2px 12px; min-height:175px; }
.hand .card { flex:0 0 126px; }
.recipe-grid { display:grid; gap:9px; }
.recipe { display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:10px; padding:11px 12px; border:1px solid var(--border); border-radius:15px; background:#fffdf9; }
.recipe.can { background:#f3f0df; }
.recipe-emoji { font-size:26px; }
.recipe button { min-height:36px; padding:8px 11px; border-radius:12px; border:0; font-weight:850; background:var(--brown); color:white; }
.game-footer { display:flex; justify-content:space-between; align-items:center; gap:16px; padding:16px 24px 22px; border-top:1px solid var(--border); }
.action-dots { letter-spacing:.12em; font-weight:900; color:var(--brown); }
.log { display:grid; gap:7px; max-height:235px; overflow:auto; }
.log-item { padding:10px 12px; border-radius:13px; background:#f7eee5; color:var(--muted); font-size:13px; }
.winner { padding:30px; text-align:center; background:linear-gradient(135deg,#f7dfc4,#fffaf5); }
.winner .trophy { font-size:70px; }
.empty { padding:26px; text-align:center; color:var(--muted); border:1px dashed var(--border); border-radius:18px; }
.toast { position:fixed; z-index:80; left:50%; bottom:24px; transform:translate(-50%,18px); opacity:0; pointer-events:none; max-width:min(520px,calc(100% - 28px)); padding:12px 16px; border-radius:15px; color:#fff; background:#39261e; box-shadow:0 14px 32px rgba(0,0,0,.2); transition:.2s ease; }
.toast.show { opacity:1; transform:translate(-50%,0); }
.toast.error { background:#7f3a35; }
.loading { min-height:46vh; display:grid; place-items:center; text-align:center; color:var(--muted); }
.spinner { width:40px; height:40px; margin:0 auto 15px; border-radius:50%; border:4px solid #ead8c8; border-top-color:var(--brown); animation:spin .8s linear infinite; }
@keyframes spin { to { transform:rotate(360deg); } }
@media (max-width: 860px) {
  .hero, .join-grid, .lobby-layout, .zone-grid { grid-template-columns:1fr; }
  .market { grid-template-columns:repeat(5,128px); }
  .main { width:min(100% - 20px,1180px); padding-top:18px; }
  .hero-card, .panel, .lobby-card, .table-card { border-radius:24px; }
  .topbar { padding:10px 12px; }
  .status-pill.subtle { display:none; }
}
@media (max-width: 560px) {
  .brand small { display:none; }
  .logo-dot { width:40px; height:40px; }
  .top-actions { gap:5px; }
  .status-pill { min-height:30px; padding:5px 8px; font-size:11px; }
  .hero-card { padding:27px 21px 32px; }
  h1 { font-size:42px; }
  .stat-grid { grid-template-columns:repeat(2,1fr); }
  .game-head, .game-footer { align-items:stretch; flex-direction:column; }
  .player-zone { padding:18px 14px 22px; }
  .score-strip { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

/* Phase 2: clienti, ricettari privati e vetrina */
.customer-zone { padding: 22px 24px 26px; background: #fbf4ec; border-bottom: 1px solid var(--border); }
.section-inline, .showcase-head { display:flex; align-items:flex-end; justify-content:space-between; gap:12px; margin-bottom:12px; }
.section-inline h3, .showcase-head h3 { margin-bottom:0; }
.customer-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.customer-card { min-width:0; padding:16px; border:1px solid var(--border); border-radius:20px; background:#fffdf9; box-shadow:0 8px 20px rgba(77,43,29,.06); }
.customer-top { display:flex; align-items:center; gap:10px; }
.customer-avatar { width:44px; height:44px; display:grid; place-items:center; border-radius:15px; background:#f4e2d1; font-size:25px; }
.customer-story { min-height:54px; margin:12px 0 10px; color:var(--muted); font-size:12px; line-height:1.5; }
.order-list { display:flex; flex-wrap:wrap; gap:6px; }
.order-chip { display:inline-flex; padding:6px 8px; border-radius:999px; background:#f3e8dd; color:var(--brown-dark); font-size:10px; font-weight:800; }
.serve-actions { display:grid; gap:6px; margin-top:12px; }
.serve-btn { min-height:36px; padding:8px 10px; border:0; border-radius:12px; background:#5b3827; color:#fff9f3; font-weight:800; text-align:left; }
.phase2-player-grid { display:grid; grid-template-columns:minmax(0,1.1fr) minmax(310px,.7fr); gap:22px; }
.compact-btn { min-height:38px; padding:8px 11px; white-space:nowrap; }
.showcase-head { margin-top:18px; }
.showcase-row { display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:8px; }
.prepared-card { display:flex; align-items:center; gap:10px; padding:12px; border:1px solid rgba(109,63,42,.12); border-radius:15px; background:#fff6e9; }
.prepared-card > span { font-size:28px; }
.prepared-card strong, .prepared-card small { display:block; }
.prepared-card small { color:var(--muted); margin-top:3px; }
.turn-controls { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.rules-mini { display:grid; gap:7px; margin-top:14px; color:var(--muted); font-size:13px; }
@media (max-width: 980px) {
  .customer-grid { grid-template-columns:1fr; }
  .customer-story { min-height:0; }
  .phase2-player-grid { grid-template-columns:1fr; }
}
@media (max-width: 560px) {
  .customer-zone { padding:18px 14px 20px; }
  .section-inline, .showcase-head { align-items:flex-start; }
  .section-inline { flex-direction:column; }
  .section-inline .compact-btn { width:100%; }
  .turn-controls { width:100%; justify-content:space-between; }
}

/* Phase 3: computer, Carte Cozy, atmosfera, decorazioni, scambi e Duo */
select { width:100%; margin-top:7px; min-height:44px; padding:10px 12px; border-radius:13px; border:1px solid var(--border); color:var(--ink); background:#fff; outline:none; font:inherit; }
select:focus { border-color:rgba(109,63,42,.42); box-shadow:0 0 0 4px rgba(109,63,42,.08); }
.lobby-player-actions { display:flex; align-items:center; justify-content:flex-end; gap:8px; flex-wrap:wrap; }
.atmosphere-banner { display:flex; align-items:center; gap:14px; padding:15px 22px; background:linear-gradient(135deg,#efe2d7,#fbf6ef); border-bottom:1px solid var(--border); }
.atmosphere-emoji { width:50px; height:50px; display:grid; place-items:center; flex:0 0 auto; border-radius:17px; background:rgba(255,255,255,.75); font-size:29px; box-shadow:inset 0 0 0 1px rgba(109,63,42,.08); }
.atmosphere-banner strong, .atmosphere-banner span { display:block; }
.atmosphere-banner span:not(.atmosphere-emoji) { margin-top:3px; color:var(--muted); font-size:12px; }
.market-actions { display:flex; gap:7px; flex-wrap:wrap; justify-content:flex-end; }
.cozy-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:8px; }
.cozy-card { display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:10px; padding:12px; border-radius:16px; border:1px solid rgba(109,63,42,.13); background:linear-gradient(145deg,#fff8ee,#f6e3d1); }
.cozy-card > span { font-size:27px; }
.cozy-card strong, .cozy-card small { display:block; }
.cozy-card small { margin-top:3px; color:var(--muted); font-size:11px; line-height:1.35; }
.cozy-card button, .shop-card button { border:0; border-radius:11px; min-height:35px; padding:7px 10px; background:var(--brown); color:white; font-weight:850; }
.owned-decorations { display:flex; flex-wrap:wrap; gap:7px; }
.decoration-chip { display:inline-flex; align-items:center; padding:7px 9px; border-radius:999px; background:#f2e6d7; font-size:11px; font-weight:800; }
.phase3-zone { padding:22px 24px 26px; border-top:1px solid var(--border); background:#f9f0e7; }
.phase3-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.feature-panel { padding:16px; border:1px solid var(--border); border-radius:20px; background:#fffdf9; }
.feature-panel h3 { margin-bottom:10px; }
.decoration-shop, .duo-list, .incoming-offers { display:grid; gap:8px; }
.shop-card { display:grid; grid-template-columns:auto 1fr auto; gap:10px; align-items:center; padding:10px; border:1px solid rgba(109,63,42,.11); border-radius:15px; background:#fff7ed; }
.shop-emoji { font-size:27px; }
.shop-card strong, .shop-card small { display:block; }
.shop-card small { margin-top:3px; color:var(--muted); font-size:10px; line-height:1.35; }
.duo-button { width:100%; display:grid; grid-template-columns:auto 1fr; gap:10px; align-items:center; text-align:left; padding:11px 12px; border:1px solid rgba(109,63,42,.13); border-radius:15px; background:#f9eee4; color:var(--ink); }
.duo-button > span { font-size:28px; }
.duo-button strong, .duo-button small { display:block; }
.duo-button small { margin-top:3px; color:var(--muted); font-size:10px; line-height:1.35; }
.trade-form { display:grid; grid-template-columns:1fr 1fr 1fr; gap:8px; align-items:end; }
.trade-form label { margin-top:0; }
.trade-form .secondary-btn { grid-column:1/-1; }
.offer-card { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:11px; border-radius:15px; background:#f6ebdf; border:1px solid rgba(109,63,42,.1); }
.offer-card.duo { background:#f4eedb; }
.offer-card p { margin:4px 0 0; }
.offer-actions { display:flex; gap:6px; flex-wrap:wrap; flex:0 0 auto; }
@media (max-width: 900px) {
  .phase3-grid { grid-template-columns:1fr; }
  .trade-form { grid-template-columns:1fr; }
  .trade-form .secondary-btn { grid-column:auto; }
}
@media (max-width: 560px) {
  .phase3-zone { padding:18px 14px 20px; }
  .atmosphere-banner { padding:13px 14px; align-items:flex-start; }
  .market-actions { width:100%; justify-content:stretch; }
  .market-actions button { flex:1; }
  .cozy-card, .shop-card { grid-template-columns:auto 1fr; }
  .cozy-card button, .shop-card button { grid-column:1/-1; width:100%; }
  .offer-card { align-items:flex-start; flex-direction:column; }
}

/* Phase 4: durate, IA regolabile, bilanciamento e risultati */
.phase4-lobby-settings { display:grid; gap:16px; margin-top:22px; padding:17px; border:1px solid var(--border); border-radius:20px; background:#fffaf4; }
.setting-choice-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:9px; }
.setting-choice { min-height:96px; padding:12px; border:1px solid rgba(109,63,42,.14); border-radius:16px; background:#f7ede3; color:var(--ink); text-align:left; }
.setting-choice span, .setting-choice strong, .setting-choice small { display:block; }
.setting-choice span { font-size:24px; margin-bottom:5px; }
.setting-choice strong { font-size:14px; }
.setting-choice small { margin-top:4px; color:var(--muted); font-size:10px; line-height:1.35; }
.setting-choice.selected { background:#fff; outline:2px solid rgba(109,63,42,.35); box-shadow:0 8px 18px rgba(77,43,29,.08); }
.match-progress { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; padding:10px 18px; background:#fffaf5; border-bottom:1px solid var(--border); }
.match-progress > div { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:9px 11px; border-radius:13px; background:#f5e8db; }
.match-progress strong, .match-progress span { font-size:11px; }
.match-progress span { color:var(--muted); text-align:right; }
.phase4-results { text-align:left; }
.phase4-results .trophy, .phase4-results > h2, .phase4-results > p, .phase4-results > .eyebrow { text-align:center; }
.final-ranking { display:grid; gap:7px; max-width:720px; margin:20px auto 0; }
.ranking-row { display:grid; grid-template-columns:44px minmax(120px,1fr) auto; align-items:center; gap:10px; padding:10px 12px; border-radius:14px; background:rgba(255,255,255,.7); border:1px solid rgba(109,63,42,.1); }
.rank-pos { font-size:20px; }
.ranking-row > span:last-child { color:var(--muted); font-size:11px; text-align:right; }
.award-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(140px,1fr)); gap:8px; max-width:850px; margin:16px auto 0; }
.award-card { padding:12px; border-radius:15px; background:#fff9ef; border:1px solid rgba(109,63,42,.1); text-align:center; }
.award-card > span { display:block; font-size:25px; }
.award-card small, .award-card strong { display:block; }
.award-card small { margin:5px 0 3px; color:var(--muted); font-size:10px; }
.award-card strong { font-size:12px; }
@media (max-width: 700px) {
  .setting-choice-grid, .match-progress { grid-template-columns:1fr; }
  .ranking-row { grid-template-columns:36px 1fr; }
  .ranking-row > span:last-child { grid-column:2; text-align:left; }
}


/* Phase 5: profilo, salvataggi, update PWA e feedback */
.update-banner { position:sticky; top:0; z-index:20; display:flex; align-items:center; justify-content:space-between; gap:14px; margin:0 auto; width:min(1180px,calc(100% - 28px)); padding:12px 14px; border:1px solid rgba(109,63,42,.18); border-radius:0 0 18px 18px; background:#fff5df; box-shadow:0 12px 28px rgba(77,43,29,.12); }
.update-banner[hidden] { display:none; }
.update-banner strong, .update-banner small { display:block; }
.update-banner small { margin-top:3px; color:var(--muted); }
.profile-dialog { width:min(720px,calc(100% - 24px)); max-height:90vh; padding:0; border:0; border-radius:24px; background:transparent; }
.profile-dialog::backdrop { background:rgba(42,26,18,.5); backdrop-filter:blur(4px); }
.profile-card { padding:22px; border:1px solid rgba(109,63,42,.16); border-radius:24px; background:#fffaf4; box-shadow:0 24px 70px rgba(42,26,18,.28); color:var(--ink); }
.profile-head { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; }
.profile-head h2 { margin-bottom:0; }
.profile-form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-top:18px; }
.profile-stats { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; margin-top:16px; }
.profile-stat { padding:11px; border-radius:15px; background:#f4e6d8; text-align:center; }
.profile-stat strong, .profile-stat small { display:block; }
.profile-stat strong { font-size:20px; }
.profile-stat small { margin-top:3px; color:var(--muted); font-size:10px; }
.toggle-row { display:flex; align-items:center; gap:9px; margin-top:16px; padding:11px 12px; border-radius:14px; background:#f7eee5; }
.toggle-row input { width:auto; margin:0; }
.phase5-dashboard { display:grid; grid-template-columns:minmax(0,1.2fr) minmax(280px,.8fr); gap:14px; margin-top:14px; }
.resume-list { display:grid; gap:8px; }
.resume-card { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px; border:1px solid rgba(109,63,42,.12); border-radius:15px; background:#fffaf4; }
.resume-card strong, .resume-card small { display:block; }
.resume-card small { margin-top:3px; color:var(--muted); }
.save-controls { display:flex; gap:8px; flex-wrap:wrap; margin-top:10px; }
.app-shell.cozy-pulse { animation:cozyPulse .38s ease; }
@keyframes cozyPulse { 0%{transform:scale(1)} 45%{transform:scale(1.006)} 100%{transform:scale(1)} }
@media (max-width:760px) {
  .profile-form-grid, .phase5-dashboard { grid-template-columns:1fr; }
  .profile-stats { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .update-banner { align-items:flex-start; flex-direction:column; }
  .update-banner button { width:100%; }
}

/* Phase 6: stesso account Cioccolata e Cozy + amici/inviti */
.auth-shell { min-height:72vh; display:grid; place-items:center; padding:28px 0; }
.auth-grid { width:min(980px,100%); display:grid; grid-template-columns:minmax(0,1.1fr) minmax(300px,.75fr); gap:18px; }
.auth-card { padding:28px; border:1px solid var(--border); border-radius:28px; background:#fffaf4; box-shadow:0 18px 50px rgba(77,43,29,.1); }
.auth-card h1 { font-size:clamp(36px,5vw,62px); }
.auth-form { display:grid; gap:11px; margin-top:18px; }
.auth-form label { margin:0; }
.auth-note { margin-top:14px; padding:12px; border-radius:15px; background:#f4e6d8; color:var(--muted); font-size:12px; line-height:1.5; }
.account-identity { margin-top:14px; padding:12px 14px; border-radius:15px; background:#f7eee5; }
.account-identity strong,.account-identity small { display:block; }
.account-identity small { color:var(--muted); margin-top:3px; }
.danger-ghost { min-height:40px; padding:9px 13px; border:1px solid rgba(127,58,53,.25); border-radius:13px; background:#fff7f5; color:#7f3a35; font-weight:850; }
.social-section { margin-top:18px; }
.social-search { display:grid; grid-template-columns:1fr auto; gap:8px; align-items:end; }
.social-search input { margin-top:0; }
.social-list { display:grid; gap:8px; margin-top:10px; }
.social-row { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:11px 12px; border:1px solid rgba(109,63,42,.12); border-radius:15px; background:#fffaf4; }
.social-main { min-width:0; display:flex; align-items:center; gap:10px; }
.social-main strong,.social-main small { display:block; }
.social-main small { color:var(--muted); margin-top:2px; }
.presence-dot { width:10px; height:10px; border-radius:999px; background:#b7a99e; flex:0 0 auto; }
.presence-dot.online { background:#4e8a66; box-shadow:0 0 0 4px rgba(78,138,102,.12); }
.friend-invite-list { display:grid; gap:8px; margin-top:10px; }
.phase6-account-card { padding:13px; border-radius:16px; background:#f7eee5; }
.phase6-account-card strong,.phase6-account-card small { display:block; }
.phase6-account-card small { margin-top:3px; color:var(--muted); }
@media (max-width:760px) { .auth-grid { grid-template-columns:1fr; } .social-search { grid-template-columns:1fr; } .social-row { align-items:flex-start; flex-direction:column; } .social-row .offer-actions { width:100%; } .social-row .offer-actions button { flex:1; } }
