.profile-renewed{--pf-green:#4d805e;--pf-muted:#758173}.pf-top{display:flex;align-items:center;justify-content:space-between;gap:15px;margin:22px 0}.pf-top h1{font-size:32px;line-height:1.2;margin:5px 0}.profile-renewed .eyebrow{font-size:11px;line-height:1.5;letter-spacing:1px}.pf-top .icon-button{flex-shrink:0;width:48px;height:48px;border-radius:17px;color:#5c7165}
.pf-passport{display:grid;grid-template-columns:105px minmax(0,1fr);gap:8px 16px;padding:24px 18px 18px;border:1px solid #e9ddc7;border-radius:29px;background:linear-gradient(140deg,#fff0d7,#fffaf0 70%);position:relative}.pf-portrait{position:relative;display:grid;place-items:center;background:#f6e4c7;border-radius:60px 60px 30px 30px;margin-top:5px}.pf-portrait img{width:100%;height:166px;object-fit:contain;position:relative;z-index:1}.pf-portrait>span{position:absolute;right:-6px;top:5px;color:#bd893b;font-size:27px}.pf-identity{align-self:center;min-width:0}.pf-label{font-size:10px;letter-spacing:1px;font-weight:800;color:#9b7853}.pf-identity h2{font-size:31px;line-height:1.2;margin:8px 0;color:#244859}.pf-identity p{font-size:14px;line-height:1.5;color:#846e53;margin:9px 0}.pf-seal{display:inline-block;font-size:11px;font-weight:800;background:#f6e7cb;border:1px dashed #d4b886;padding:7px 9px;border-radius:12px;color:#8e6a37}.pf-motto{grid-column:1/-1;text-align:center;border-top:1px solid #eadcc4;padding-top:15px;font-size:13px;line-height:1.5;color:#867052;margin:12px 0 0}
.pf-small-wins{display:flex;flex-wrap:wrap;gap:12px;align-items:center;padding:20px 4px;color:#758172;font-size:12px}.pf-small-wins b{color:#3f6a51;font-size:17px;margin-right:3px}.pf-small-wins button{border:0;background:none;font:800 13px var(--font-body);color:#bd582b;min-height:40px;margin-left:auto;cursor:pointer}
.pf-next{padding:21px;border-radius:26px;border:1px solid #d7e4ce;background:#edf5e6;margin:0 0 28px}.pf-next-head{display:flex;justify-content:space-between;align-items:center;gap:15px}.pf-next h2{font-size:26px;line-height:1.2;color:#376349;margin:4px 0 10px}.pf-next p{font-size:15px;line-height:1.55;color:#60785d;margin:0 0 16px}.pf-next-progress{display:flex;justify-content:space-between;gap:12px;font-size:12px;color:#647a60}.pf-next-progress strong{color:#386046}.pf-next .bar{height:7px;margin:9px 0 18px}.pf-next .primary{width:100%;min-height:52px;font-size:16px;margin:0;padding:13px 15px}.pf-next-head .pf-badge-symbol{width:40px;height:40px;font-size:25px;background:#dfebd2}
.pf-collection h2{font-size:26px;line-height:1.2;margin:8px 0}.pf-collection header p{font-size:14px;line-height:1.5;color:#74816f;margin:8px 0 18px}.pf-badge-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-items:start}.pf-badge{border:1px solid #e6e4d8;background:#fffdf7;border-radius:22px;overflow:hidden}.pf-badge summary{list-style:none;text-align:center;padding:18px 12px;cursor:pointer;min-height:163px;display:flex;flex-direction:column;align-items:center;justify-content:center}.pf-badge summary::-webkit-details-marker{display:none}.pf-badge-symbol{display:grid;place-items:center;width:54px;height:54px;border-radius:18px;background:#f2eee2;color:#9b967e;font-size:31px;margin-bottom:10px}.pf-badge-symbol svg{width:27px;height:27px}.pf-badge strong{font-size:16px;line-height:1.3;display:block}.pf-badge small{font-size:11px;line-height:1.4;margin-top:8px;color:#7b8175}.pf-badge.earned{border-color:#ccdcbc;background:#f7faef}.pf-badge.earned .pf-badge-symbol{background:#e2efd3;color:#66864d;box-shadow:0 3px 0 #d4e3c3}.pf-badge.earned small{color:#4d7a4c}.pf-badge-detail{padding:0 12px 14px;border-top:1px solid #e4e7da;font-size:12px;line-height:1.6}.pf-badge-detail p{color:#6b7a65}.pf-badge-detail>span{font-weight:800;color:#5c7951}.pf-badge-detail button{display:block;width:100%;padding:10px 5px;margin-top:8px;min-height:44px;border-radius:12px;background:#edf3e5;border:1px solid #d4dfc8;color:#4c6d41;font:800 12px var(--font-body);cursor:pointer}
.pf-links{margin-top:28px;border-top:1px solid #e2e5d8}.pf-links>button{display:flex;align-items:center;gap:14px;width:100%;padding:19px 2px;border:0;border-bottom:1px solid #e2e5d8;text-align:left;background:none;color:var(--ink);cursor:pointer}.pf-link-icon{display:grid;place-items:center;flex:0 0 38px;height:42px;border-radius:13px;background:#f1ebf4;color:#8b759c;font-size:24px}.pf-link-icon svg{width:22px;height:22px}.pf-links>button>span:nth-child(2){flex:1;min-width:0}.pf-links strong{display:block;font-size:17px}.pf-links small{display:block;font-size:12px;line-height:1.5;color:#7c8577;margin-top:5px}.pf-links b{color:#8c9a83;font-size:24px}.pf-footer{text-align:center;font-size:12px;line-height:1.6;color:#7e8978;margin:24px 10px}.profile-renewed button:focus-visible,.profile-renewed summary:focus-visible{outline:3px solid #ce652f;outline-offset:3px}
.profile-renewed .pf-top{margin:14px 0}.pf-passport{grid-template-columns:80px minmax(0,1fr);gap:6px 14px;padding:16px}.pf-portrait img{height:120px}.pf-identity h2{font-size:28px;margin:5px 0}.pf-identity p{font-size:13px;line-height:1.35;margin:6px 0}.pf-seal{padding:5px 8px}.pf-motto{padding-top:9px;margin-top:5px;font-size:12px}.pf-small-wins{display:grid;grid-template-columns:1fr 1fr auto;gap:8px;padding:12px 2px;font-size:11px}.pf-small-wins b{display:block;font-size:17px}.pf-small-wins button{font-size:12px;padding:4px;max-width:85px}.pf-next{padding:17px;margin-bottom:24px}.pf-next h2{font-size:24px;margin:3px 0 7px}.pf-next p{font-size:14px;line-height:1.4;margin-bottom:12px}.pf-next-head .pf-badge-symbol{margin-bottom:4px}.pf-next .bar{margin:10px 0 20px}.pf-badge-symbol svg{width:34px;height:34px}.pf-next-head .pf-badge-symbol svg{width:28px;height:28px}
@media(max-width:360px){.pf-passport{grid-template-columns:70px minmax(0,1fr);gap:8px;padding:14px}.pf-portrait img{height:112px}.pf-identity h2{font-size:26px}.pf-label{font-size:9px}.pf-seal{font-size:10px}.pf-badge summary{padding:16px 9px}.pf-next{padding:15px}.pf-small-wins{gap:6px;font-size:10px}}
.storage-notice:not([hidden]){position:fixed;top:calc(10px + env(safe-area-inset-top,0px));left:50%;transform:translateX(-50%);z-index:1100;width:min(calc(100% - 24px),410px);padding:14px 18px;border:1px solid #dca579;border-radius:18px;background:#fff3df;color:#684427;box-shadow:0 5px 24px #312b2520;font-size:13px;line-height:1.5}

/* ===== Profile v2: modern (iOS-like) layout ===== */
.pf2 { --pf2-shadow: 0 1px 2px rgba(23, 57, 84, 0.04), 0 10px 26px rgba(23, 57, 84, 0.07); --pf2-border: color-mix(in srgb, var(--line) 80%, transparent); }
.pf2-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 6px 0 16px; }
.pf2-top h1 { margin: 0; color: var(--ink); font-family: var(--font-display); font-size: 32px; line-height: 1.1; }
.pf2-hero { display: grid; gap: 16px; padding: 18px; border: 1px solid var(--pf2-border); border-radius: 28px; background: var(--card); box-shadow: var(--pf2-shadow); }
.pf2-id { display: flex; align-items: center; gap: 16px; }
.pf2-avatar { display: grid; flex: none; width: 76px; height: 76px; overflow: hidden; place-items: end center; border-radius: 24px; background: linear-gradient(145deg, #ffd2b4, #ff8f5f); box-shadow: 0 8px 18px rgba(255, 120, 70, 0.28); }
.pf2-avatar img { width: 120%; height: auto; max-width: none; margin-bottom: -32%; }
.pf2-kicker { color: var(--muted); font-size: 11px; font-weight: 900; letter-spacing: 0.08em; }
.pf2-id h2 { margin: 2px 0 8px; color: var(--ink); font-family: var(--font-display); font-size: 22px; line-height: 1.15; }
.pf2-pill { display: inline-block; padding: 4px 10px; border-radius: 999px; background: color-mix(in srgb, #f2b544 22%, transparent); color: #8a5a00; font-size: 12px; font-weight: 900; }
html[data-theme="dark"] .pf2-pill { color: #ffd27a; }
.pf2-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pf2-tile { display: grid; justify-items: start; gap: 2px; padding: 12px; border: 0; border-radius: 18px; background: var(--tile-bg); color: var(--ink); font: inherit; text-align: left; }
.pf2-tile > span { color: var(--tile-fg); font-size: 18px; line-height: 1; }
.pf2-tile strong { font-family: var(--font-display); font-size: 22px; line-height: 1.1; }
.pf2-tile small { color: var(--muted); font-size: 11px; font-weight: 800; line-height: 1.2; }
.pf2-tile-fire { --tile-bg: color-mix(in srgb, #ff7a3d 12%, transparent); --tile-fg: #ff6a2b; }
.pf2-tile-heart { --tile-bg: color-mix(in srgb, #ef5a5a 12%, transparent); --tile-fg: #e5484d; cursor: pointer; }
.pf2-tile-star { --tile-bg: color-mix(in srgb, #f2b544 16%, transparent); --tile-fg: #e0a100; }
.pf2-section { margin-top: 24px; }
.pf2-section h3 { margin: 0 4px 10px; color: var(--ink); font-family: var(--font-display); font-size: 19px; }
.pf2-group { overflow: hidden; border: 1px solid var(--pf2-border); border-radius: 24px; background: var(--card); box-shadow: var(--pf2-shadow); }
.pf2-row { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr) 14px; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; border: 0; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.pf2-row + .pf2-row::before, .pf2-setting + .pf2-setting::before { position: absolute; top: 0; right: 0; left: 16px; height: 1px; background: var(--line); content: ""; }
.pf2-row + .pf2-row::before { left: 74px; }
.pf2-row-icon { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 14px; background: linear-gradient(145deg, var(--g1), var(--g2)); color: #fff; box-shadow: 0 6px 14px color-mix(in srgb, var(--g2) 30%, transparent); font-family: var(--font-tamil); font-size: 20px; font-weight: 700; }
.pf2-row-icon :is(svg, .nav-svg, .village-mini-svg) { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.pf2-themes { --g1: #ffb38a; --g2: #ff7a45; }
.pf2-villages { --g1: #7cc79f; --g2: #3f8f6b; }
.pf2-kural { --g1: #f2cf7a; --g2: #c98a2e; }
.pf2-row-copy { display: grid; gap: 2px; min-width: 0; }
.pf2-row-copy strong { font-size: 16px; font-weight: 800; }
.pf2-row-copy small { overflow: hidden; color: var(--muted); font-size: 12.5px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.pf2-row > b { color: var(--muted); font-size: 22px; }
.pf2-bar { display: block; height: 5px; margin-top: 6px; overflow: hidden; border-radius: 999px; background: color-mix(in srgb, var(--line) 85%, transparent); }
.pf2-bar i { display: block; height: 100%; min-width: 5px; border-radius: inherit; background: linear-gradient(90deg, var(--g1, #ffb38a), var(--g2, #ff7a45)); }
.pf2-next { display: grid; grid-template-columns: 56px minmax(0, 1fr) 40px; align-items: center; gap: 14px; margin-bottom: 12px; padding: 14px; border: 1px solid var(--pf2-border); border-radius: 24px; background: var(--card); box-shadow: var(--pf2-shadow); }
.pf2-next strong { display: block; color: var(--ink); font-size: 16px; }
.pf2-next small { display: block; color: var(--muted); font-size: 12.5px; font-weight: 700; }
.pf2-go { width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--orange); color: #fff; font-size: 18px; font-weight: 900; cursor: pointer; box-shadow: 0 6px 14px color-mix(in srgb, var(--orange) 30%, transparent); }
.pf2-medals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pf2-badge { display: grid; justify-items: center; gap: 6px; padding: 14px 6px 12px; border: 1px solid var(--pf2-border); border-radius: 20px; background: var(--card); color: var(--ink); font: inherit; text-align: center; cursor: pointer; box-shadow: var(--pf2-shadow); }
.pf2-badge strong { font-size: 12px; font-weight: 800; line-height: 1.25; }
.pf2-badge small { color: var(--muted); font-size: 11px; font-weight: 800; }
.pf2-medal { display: grid; width: 52px; height: 52px; place-items: center; border-radius: 50%; background: color-mix(in srgb, var(--line) 70%, transparent); color: var(--muted); }
.pf2-medal svg { width: 28px; height: 28px; }
.pf2-badge.won .pf2-medal, .pf2-medal-next { background: linear-gradient(145deg, #ffd88a, #f2a33a); color: #fff; box-shadow: 0 6px 14px rgba(242, 163, 58, 0.35); }
.pf2-medal-next { width: 56px; height: 56px; }
.pf2-badge.won small { color: #c07a00; }
.pf2-setting { position: relative; display: grid; gap: 10px; padding: 14px 16px; }
.pf2-setting strong { color: var(--ink); font-size: 15px; font-weight: 800; }
.pf2-segment { display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; gap: 4px; padding: 4px; border-radius: 14px; background: color-mix(in srgb, var(--line) 70%, transparent); }
.pf2-segment button { min-height: 36px; padding: 0 6px; border: 0; border-radius: 10px; background: transparent; color: var(--ink-2); font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; }
.pf2-segment button.active { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(23, 57, 84, 0.12); }
.pf2-setting-link { display: flex; align-items: center; justify-content: space-between; width: 100%; border: 0; background: none; font: inherit; text-align: left; cursor: pointer; }
.pf2-setting-link b { color: var(--muted); font-size: 22px; }
.pf2-footer { margin: 18px 4px 0; color: var(--muted); font-size: 12px; font-weight: 600; text-align: center; }
/* Trophy families and tiers */
.pf2-h-count { display: flex; align-items: baseline; justify-content: space-between; }
.pf2-h-count span { color: var(--muted); font-family: var(--font-body); font-size: 14px; font-weight: 800; }
.pf2-family { margin-top: 14px; }
.pf2-family-head { display: flex; align-items: baseline; justify-content: space-between; margin: 0 4px 8px; }
.pf2-family-head strong { color: var(--ink-2); font-size: 12px; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; }
.pf2-family-head small { color: var(--muted); font-size: 12px; font-weight: 800; }
.tier-bronze { --m1: #f6c79c; --m2: #c47a43; --mr: #c47a43; }
.tier-silver { --m1: #eef3f7; --m2: #93a4b2; --mr: #93a4b2; }
.tier-gold { --m1: #ffe08f; --m2: #f0a22e; --mr: #f0a22e; }
.pf2-badge .pf2-medal { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--mr) 45%, transparent); }
.pf2-badge.won .pf2-medal, .pf2-medal-next { background: linear-gradient(145deg, var(--m1), var(--m2)); color: #fff; box-shadow: 0 6px 14px color-mix(in srgb, var(--m2) 40%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.5); }
.pf2-badge.won.tier-silver .pf2-medal { color: #4f6070; }
.pf2-badge.won small { color: var(--m2); }
.pf2-badge .pf2-bar { width: 70%; margin-top: 2px; }
.pf2-badge .pf2-bar i { background: linear-gradient(90deg, var(--m1), var(--m2)); }
/* Each family scrolls sideways like an iOS shelf: no lonely last item */
.pf2-family .pf2-medals { display: flex; gap: 10px; margin: 0 -4px; padding: 2px 4px 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.pf2-family .pf2-medals::-webkit-scrollbar { display: none; }
.pf2-family .pf2-badge { flex: 0 0 118px; scroll-snap-align: start; }
.pf2-top { margin-top: 13px; }
