/* A character's public page (โปรไฟล์ตัวละคร, src/map/profile.js /p/<name>; client/profile/profile.js): Gieno-RO's own
   artwork behind (client/img/gieno-bg.jpg, the login screen's), a cream card with the game's gold edge - the character's
   stage (the aura window's grass) beside its name, title, job and levels, chips of its guild / Member / rank /
   achievements, its aura and trail, its places in the Hall of Fame - then the big gold "มาเล่นด้วยกัน". One column on a
   phone (iPhone 13: 390 px), two on a computer. Fonts of the game only (client/fonts: Kanit, the game's Tahoma stack). */

:root {
	--ink: #3d2614; --ink-2: #6b4a2e; --muted: #8a6d55; --cream: #fffaf0; --cream-2: #fff3dc; --line: #ecd3a2;
	--gold: #e0a713; --gold-2: #f2b631; --gold-hi: #ffe48a; --gold-ink: #4a3000; --rose: #ff7ab8; --sky: #3b2346;
	--ui: Tahoma, 'Midgard Thai', 'Kanit', system-ui, sans-serif;
	--head: 'Kanit', Tahoma, 'Midgard Thai', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { margin: 0; min-height: 100%; }
body.pf { background: var(--sky); color: var(--ink); font: 15px/1.5 var(--ui); overflow-x: hidden; }
.pf-bg { position: fixed; inset: -24px; z-index: -1; background: #3b2346 url('/img/gieno-bg.jpg') 50% 30% / cover no-repeat; filter: blur(5px) saturate(1.1) brightness(0.62); transform: scale(1.04); }
.pf-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(59, 35, 70, 0.15), rgba(40, 20, 50, 0.55) 70%, rgba(30, 14, 40, 0.75)); }

.pf-top { display: flex; justify-content: center; padding: max(14px, env(safe-area-inset-top)) 16px 6px; }
.pf-brand { display: block; line-height: 0; }
.pf-brand img { width: 196px; max-width: 52vw; height: auto; border-radius: 14px; box-shadow: 0 0 0 2px rgba(255, 236, 190, 0.55), 0 6px 16px rgba(0, 0, 0, 0.45); }

.pf-main { width: 100%; max-width: 940px; margin: 0 auto; padding: 8px 14px 18px; display: flex; flex-direction: column; gap: 16px; }
.pf-card { display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr); gap: 22px; padding: 16px; border-radius: 20px;
	background: linear-gradient(170deg, var(--cream) 0%, #fff7e6 60%, var(--cream-2) 100%); border: 2px solid var(--line);
	box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.6) inset, 0 18px 40px rgba(20, 8, 30, 0.45); }

/* the stage */
.pf-stage { position: relative; width: 100%; aspect-ratio: 4 / 5; border-radius: 14px; overflow: hidden; background: #3b4d22 radial-gradient(circle at 50% 70%, #55702e, #2c3a18 75%);
	box-shadow: 0 0 0 2px #f6e2b4, 0 0 0 4px #c99a3d, 0 8px 20px rgba(60, 30, 10, 0.35); touch-action: pan-y; }
.pf-canvas, .pf-still { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.pf-canvas[hidden], .pf-still[hidden] { display: none; }
.pf-still { background: radial-gradient(circle at 50% 78%, #f7e8c8, #e9d3a6 55%, #d8b878); }
.pf-stage.pf-none { background: #fff3dc url('/img/gieno-logo.png') 50% 45% / 70% auto no-repeat; }
.pf-stage.pf-none .pf-canvas { display: none; }
.pf-load { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); pointer-events: none; }
.pf-load[hidden] { display: none; }
.pf-load span { width: 38px; height: 38px; border-radius: 50%; border: 4px solid rgba(255, 255, 255, 0.35); border-top-color: var(--gold-hi); animation: pf-spin 0.9s linear infinite; }
.pf-load small { font-size: 13px; }
@keyframes pf-spin { to { transform: rotate(360deg); } }
.pf-ctl { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); display: flex; gap: 8px; padding: 5px; border-radius: 26px; background: rgba(20, 12, 8, 0.42); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.pf-ctl[hidden] { display: none; }
.pf-ctl button { min-width: 44px; height: 38px; padding: 0 12px; border: 1px solid rgba(255, 255, 255, 0.35); border-radius: 19px; background: rgba(255, 255, 255, 0.14); color: #fff;
	font: 600 18px/1 var(--head); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.pf-ctl button.pf-walk { font-size: 14px; min-width: 64px; }
.pf-ctl button.on { background: linear-gradient(var(--gold-hi), var(--gold-2)); color: var(--gold-ink); border-color: #c98a0e; }
.pf-ctl button:disabled { opacity: 0.4; cursor: default; }
.pf-ctl button:hover:not(:disabled) { background: rgba(255, 255, 255, 0.28); }
.pf-ctl button.on:hover { background: linear-gradient(#fff0b0, var(--gold-2)); }

/* the character */
.pf-info { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 6px 4px; }
.pf-title { margin: 0; padding: 3px 14px; border-radius: 14px; background: linear-gradient(90deg, #fff1c4, #ffe08a); border: 1px solid #e3b649; color: #8a4b00; font: 600 14px/1.4 var(--head); max-width: 100%; overflow-wrap: anywhere; }
.pf-name { margin: 0; font: 700 34px/1.15 var(--head); color: var(--ink); letter-spacing: 0.2px; overflow-wrap: anywhere; max-width: 100%; text-shadow: 0 1px 0 #fff; }
.pf-job { margin: -2px 0 0; font: 500 17px/1.3 var(--head); color: var(--ink-2); }
.pf-lv { display: flex; gap: 8px; margin-top: 2px; }
.pf-lv span { display: flex; flex-direction: column; align-items: center; min-width: 92px; padding: 6px 12px 7px; border-radius: 12px; background: #fff; border: 1px solid var(--line); box-shadow: 0 2px 0 #f0dcb2; }
.pf-lv small { font-size: 11.5px; color: var(--muted); line-height: 1.2; }
.pf-lv b { font: 700 26px/1.1 var(--head); color: #b0430a; }
.pf-chips, .pf-fx { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; width: 100%; }
.pf-chip, .pf-fx li { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 8px 10px; border-radius: 12px; background: #fff; border: 1px solid var(--line); text-align: left; }
.pf-chip i, .pf-fx i { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--cream-2); font-style: normal; font-size: 17px; line-height: 1; }
.pf-chip span, .pf-fx span { display: flex; flex-direction: column; min-width: 0; }
.pf-chip small, .pf-fx small { font-size: 11.5px; color: var(--muted); line-height: 1.25; }
.pf-chip b, .pf-fx b { font-size: 14.5px; line-height: 1.3; color: var(--ink); overflow-wrap: anywhere; }
.pf-fx { grid-template-columns: 1fr; }
.pf-c-rank i { background: var(--rc, var(--gold)); color: #fff; text-shadow: 0 1px 1px rgba(0, 0, 0, 0.35); }
.pf-fx li { background: linear-gradient(120deg, #fff, #fff6e2); }
.pf-fx i { background: linear-gradient(135deg, #ffe7f3, #e9e2ff); }
.pf-fame { width: 100%; margin-top: 4px; }
.pf-fame h2 { margin: 0 0 6px; font: 600 15px/1.3 var(--head); color: var(--ink-2); }
.pf-fame ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.pf-f { display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px 3px 4px; border-radius: 16px; background: #fff; border: 1px solid var(--line); font-size: 13.5px; }
.pf-f b { display: inline-grid; place-items: center; min-width: 30px; height: 24px; padding: 0 6px; border-radius: 12px; background: #e9edf5; color: #39445e; font: 700 13px/1 var(--head); }
.pf-f.top1 b { background: linear-gradient(#ffe48a, #e9a92c); color: #4a3000; }
.pf-f.top2 b { background: linear-gradient(#f3f5f9, #c4cad6); color: #333c4e; }
.pf-f.top3 b { background: linear-gradient(#ffd8b0, #d2884a); color: #4a2400; }

/* the ranking page's link (rankweb.js /rank) */
.pf-rank { display: inline-flex; align-items: center; gap: 6px; margin-top: 2px; padding: 6px 14px; border-radius: 16px; background: #fff; border: 1px solid var(--line); color: #8a4b00;
	font: 600 14px/1.3 var(--head); text-decoration: none; box-shadow: 0 2px 0 #f0dcb2; -webkit-tap-highlight-color: transparent; }
.pf-rank span { font-size: 17px; line-height: 1; color: var(--gold); }
.pf-rank:hover { background: #fff6dd; border-color: #e3b649; }
.pf-empty .pf-rank { margin-top: 8px; }

/* the invite */
.pf-join { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 4px 6px 0; }
.pf-cta { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: min(100%, 460px); min-height: 60px; padding: 10px 26px; border-radius: 32px;
	background: linear-gradient(#fff0a6, var(--gold-2) 55%, #e09a14); color: var(--gold-ink); border: 2px solid #b97c09; text-decoration: none;
	font: 700 22px/1.2 var(--head); letter-spacing: 0.3px; box-shadow: 0 4px 0 #9b6506, 0 10px 24px rgba(0, 0, 0, 0.35); animation: pf-glow 2.2s ease-in-out infinite; -webkit-tap-highlight-color: transparent; }
.pf-cta:hover { filter: brightness(1.06); }
.pf-cta:active { transform: translateY(2px); box-shadow: 0 2px 0 #9b6506, 0 6px 14px rgba(0, 0, 0, 0.35); }
@keyframes pf-glow { 0%, 100% { box-shadow: 0 4px 0 #9b6506, 0 10px 24px rgba(0, 0, 0, 0.35), 0 0 0 0 rgba(255, 214, 90, 0.55); } 50% { box-shadow: 0 4px 0 #9b6506, 0 10px 24px rgba(0, 0, 0, 0.35), 0 0 0 10px rgba(255, 214, 90, 0); } }
@media (prefers-reduced-motion: reduce) { .pf-cta, .pf-load span { animation: none; } }
.pf-join p { margin: 0; max-width: 520px; color: #fff; font-size: 14px; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7); }
.pf-join p b { color: var(--gold-hi); }
.pf-foot { padding: 8px 16px max(16px, env(safe-area-inset-bottom)); text-align: center; color: rgba(255, 255, 255, 0.72); font-size: 12px; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); }

/* nobody */
.pf-empty { grid-template-columns: 1fr; justify-items: center; text-align: center; padding: 34px 20px 30px; gap: 10px; }
.pf-q { display: grid; place-items: center; width: 84px; height: 84px; border-radius: 50%; background: linear-gradient(#fff1c4, #ffd36a); border: 2px solid #e3b649; color: #8a4b00; font: 700 46px/1 var(--head); }
.pf-empty h1 { margin: 4px 0 0; font: 700 24px/1.3 var(--head); }
.pf-empty p { margin: 0; color: var(--ink-2); max-width: 440px; }

/* a phone */
@media (max-width: 720px) {
	.pf-main { padding: 4px 12px 14px; gap: 14px; }
	.pf-card { grid-template-columns: 1fr; gap: 14px; padding: 12px; border-radius: 18px; }
	.pf-stage { max-width: 420px; margin: 0 auto; }
	.pf-info { align-items: center; text-align: center; padding: 0 2px 4px; }
	.pf-name { font-size: 30px; }
	.pf-lv { justify-content: center; }
	.pf-fame ul { justify-content: center; }
	.pf-fame h2 { text-align: center; }
	.pf-cta { font-size: 21px; min-height: 56px; }
	.pf-brand img { width: 150px; border-radius: 11px; }
	/* (the invite stays at the bottom of the screen while the card scrolls by) */
	.pf-join { position: sticky; bottom: 0; z-index: 5; margin: 0 -12px; padding: 10px 12px max(10px, env(safe-area-inset-bottom)); gap: 6px; border-radius: 18px 18px 0 0;
		background: rgba(36, 18, 46, 0.9); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); border-top: 1px solid rgba(255, 214, 110, 0.45); box-shadow: 0 -6px 18px rgba(0, 0, 0, 0.35); }
	.pf-join p { font-size: 13px; line-height: 1.4; }
}
@media (max-width: 360px) {
	.pf-chips { grid-template-columns: 1fr; }
	.pf-name { font-size: 26px; }
}
