/*
 * A look as a round profile picture: background, 3D car, border.
 * Used by the website and by the extension panel (tools/build-look.mjs copies
 * this file to both). Every size is worked out from --s, the width of the
 * picture, so the same border reads at 36 pixels and at 200.
 */

.look {
  --s: 48px;
  --rim: 0px; /* how much room the border takes */
  position: relative;
  display: inline-block;
  flex: none;
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  line-height: 0;
  vertical-align: middle;
}
.look[data-border] { --rim: calc(var(--s) * 0.085); }
.look-bg, .look-car { position: absolute; inset: var(--rim); border-radius: 50%; }
.look-car { width: calc(100% - var(--rim) * 2); height: calc(100% - var(--rim) * 2); }

/* ---- backgrounds ---- */
.look-bg { background: #221d35; }
.look-bg::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle at 50% 38%, rgba(255, 255, 255, 0.16), transparent 62%); }
.look[data-backdrop='plum'] .look-bg { background: #3b1d5e; }
.look[data-backdrop='navy'] .look-bg { background: #172554; }
.look[data-backdrop='forest'] .look-bg { background: #14432a; }
.look[data-backdrop='wine'] .look-bg { background: #4c0519; }
.look[data-backdrop='slate'] .look-bg { background: #334155; }
.look[data-backdrop='dawn'] .look-bg { background: linear-gradient(160deg, #a5b4fc 0%, #f0abfc 55%, #fed7aa 100%); }
.look[data-backdrop='ocean'] .look-bg { background: linear-gradient(180deg, #0e7490 0%, #0c2f4a 70%, #071a2e 100%); }
.look[data-backdrop='sunset'] .look-bg { background: linear-gradient(180deg, #4c1d95 0%, #db2777 48%, #fb923c 82%, #fde047 100%); }
.look[data-backdrop='grid'] .look-bg {
  background-color: #1a1436;
  background-image: linear-gradient(rgba(167, 139, 250, 0.6) 1px, transparent 1px), linear-gradient(90deg, rgba(167, 139, 250, 0.6) 1px, transparent 1px);
  background-size: calc(var(--s) * 0.11) calc(var(--s) * 0.11);
  background-position: center;
}
.look[data-backdrop='stars'] .look-bg {
  background:
    radial-gradient(circle at 22% 28%, #fff 0 1.2%, transparent 1.6%), radial-gradient(circle at 70% 18%, #fff 0 0.9%, transparent 1.3%),
    radial-gradient(circle at 84% 52%, #fff 0 1.1%, transparent 1.5%), radial-gradient(circle at 34% 70%, #fff 0 0.8%, transparent 1.2%),
    radial-gradient(circle at 56% 40%, #c4b5fd 0 0.9%, transparent 1.3%), radial-gradient(circle at 12% 56%, #fff 0 0.7%, transparent 1.1%),
    radial-gradient(circle at 62% 82%, #fff 0 1%, transparent 1.4%), radial-gradient(circle at 44% 14%, #7dd3fc 0 0.8%, transparent 1.2%),
    radial-gradient(ellipse at 50% 60%, #3b1d8a 0%, #0b0a24 70%);
}
.look[data-backdrop='northern'] .look-bg { background: linear-gradient(200deg, #052e2b 0%, #10b981 30%, #22d3ee 52%, #7c3aed 78%, #1e1b4b 100%); }
.look[data-backdrop='foil'] .look-bg { background: conic-gradient(from 30deg, #fde68a, #b45309, #fbbf24, #fff7d6, #d97706, #fde68a, #92400e, #fbbf24, #fde68a); }
/* The Founders set, in Luck Inc's black and white: a hall with a tall lit arch at the far end, a column either
   side, light from above and a chequered marble floor. It is a small drawing carried in this file. */
/* founders-hall:start (written by tools/make-founders-hall.mjs, do not edit by hand) */
.look[data-backdrop='founders'] .look-bg { background: #050506 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200' preserveAspectRatio='none'%3E%3Cdefs%3E%3CradialGradient id='wall' cx='.5' cy='.3' r='.8'%3E%3Cstop offset='0' stop-color='%233b3b43'/%3E%3Cstop offset='.5' stop-color='%2317171b'/%3E%3Cstop offset='1' stop-color='%23050506'/%3E%3C/radialGradient%3E%3ClinearGradient id='pane' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23fff' stop-opacity='.5'/%3E%3Cstop offset='.55' stop-color='%23fff' stop-opacity='.2'/%3E%3Cstop offset='1' stop-color='%23fff' stop-opacity='.06'/%3E%3C/linearGradient%3E%3ClinearGradient id='shaft' x1='0' y1='0' x2='1' y2='0'%3E%3Cstop offset='0' stop-color='%2355555d'/%3E%3Cstop offset='.35' stop-color='%23e4e4e8'/%3E%3Cstop offset='1' stop-color='%232c2c32'/%3E%3C/linearGradient%3E%3ClinearGradient id='beam' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23fff' stop-opacity='.3'/%3E%3Cstop offset='1' stop-color='%23fff' stop-opacity='0'/%3E%3C/linearGradient%3E%3ClinearGradient id='far' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23050506'/%3E%3Cstop offset='.5' stop-color='%23050506' stop-opacity='.25'/%3E%3Cstop offset='1' stop-color='%23050506' stop-opacity='0'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width='200' height='200' fill='url(%23wall)'/%3E%3Cpath d='M61 125V60A39 39 0 0 1 139 60V125Z' fill='url(%23pane)'/%3E%3Cpath d='M80.5 60V125M100 60V125M119.5 60V125M88 55L64 45M91 51L72 32M95 48L85 24M100 47L100 21M105 48L115 24M109 51L128 32M112 55L136 45M87 60A13 13 0 0 1 113 60' fill='none' stroke='%23fff' stroke-width='.8' opacity='.5'/%3E%3Cpath d='M61 125V60A39 39 0 0 1 139 60V125' fill='none' stroke='%23fff' stroke-width='1.6' opacity='.9'/%3E%3Cpath d='M56 125V60A44 44 0 0 1 144 60V125' fill='none' stroke='%23fff' stroke-width='.6' opacity='.45'/%3E%3Crect x='27' y='22' width='12' height='103' fill='url(%23shaft)'/%3E%3Cpath d='M29 24V122M32 24V122M34 24V122M37 24V122' stroke='%23000' stroke-width='.7' opacity='.45'/%3E%3Crect x='24' y='17' width='18' height='5' rx='1' fill='%23d9d9de'/%3E%3Crect x='25' y='122' width='16' height='4' rx='1' fill='%23b9b9c0'/%3E%3Crect x='161' y='22' width='12' height='103' fill='url(%23shaft)'/%3E%3Cpath d='M163 24V122M166 24V122M168 24V122M171 24V122' stroke='%23000' stroke-width='.7' opacity='.45'/%3E%3Crect x='158' y='17' width='18' height='5' rx='1' fill='%23d9d9de'/%3E%3Crect x='159' y='122' width='16' height='4' rx='1' fill='%23b9b9c0'/%3E%3Cpath d='M84 0H116L168 125H32Z' fill='url(%23beam)'/%3E%3Crect y='125' width='200' height='75' fill='%23060607'/%3E%3Cpath d='M-2 200L32 200L48 178L22 178ZM66 200L100 200L100 178L74 178ZM134 200L168 200L152 178L126 178Z' fill='%23fff' opacity='0.5'/%3E%3Cpath d='M-5 178L22 178L36 164L15 164ZM48 178L74 178L79 164L58 164ZM100 178L126 178L121 164L100 164ZM152 178L178 178L164 164L143 164Z' fill='%23fff' opacity='0.39'/%3E%3Cpath d='M-6 164L15 164L28 155L11 155ZM36 164L58 164L64 155L46 155ZM79 164L100 164L100 155L82 155ZM121 164L143 164L136 155L118 155ZM164 164L185 164L172 155L154 155Z' fill='%23fff' opacity='0.3'/%3E%3Cpath d='M-7 155L11 155L23 148L7 148ZM28 155L46 155L54 148L38 148ZM64 155L82 155L85 148L69 148ZM100 155L118 155L115 148L100 148ZM136 155L154 155L146 148L131 148ZM172 155L189 155L177 148L162 148Z' fill='%23fff' opacity='0.24'/%3E%3Cpath d='M-8 148L7 148L18 142L5 142ZM23 148L38 148L46 142L32 142ZM54 148L69 148L73 142L59 142ZM85 148L100 148L100 142L86 142ZM115 148L131 148L127 142L114 142ZM146 148L162 148L154 142L141 142ZM177 148L193 148L182 142L168 142Z' fill='%23fff' opacity='0.2'/%3E%3Cpath d='M-9 142L5 142L15 138L3 138ZM18 142L32 142L39 138L27 138ZM46 142L59 142L64 138L51 138ZM73 142L86 142L88 138L76 138ZM100 142L114 142L112 138L100 138ZM127 142L141 142L136 138L124 138ZM154 142L168 142L161 138L149 138ZM182 142L195 142L185 138L173 138Z' fill='%23fff' opacity='0.17'/%3E%3Cpath d='M-9 138L3 138L12 135L1 135ZM15 138L27 138L34 135L23 135ZM39 138L51 138L56 135L45 135ZM64 138L76 138L78 135L67 135ZM88 138L100 138L100 135L89 135ZM112 138L124 138L122 135L111 135ZM136 138L149 138L144 135L133 135ZM161 138L173 138L166 135L155 135ZM185 138L197 138L188 135L177 135Z' fill='%23fff' opacity='0.14'/%3E%3Cpath d='M-10 135L1 135L10 132L0 132ZM12 135L23 135L30 132L20 132ZM34 135L45 135L50 132L40 132ZM56 135L67 135L70 132L60 132ZM78 135L89 135L90 132L80 132ZM100 135L111 135L110 132L100 132ZM122 135L133 135L130 132L120 132ZM144 135L155 135L150 132L140 132ZM166 135L177 135L170 132L160 132ZM188 135L199 135L190 132L180 132Z' fill='%23fff' opacity='0.13'/%3E%3Cpath d='M-10 132L0 132L8 130L-1 130ZM10 132L20 132L26 130L17 130ZM30 132L40 132L45 130L36 130ZM50 132L60 132L63 130L54 130ZM70 132L80 132L82 130L72 130ZM90 132L100 132L100 130L91 130ZM110 132L120 132L118 130L109 130ZM130 132L140 132L137 130L128 130ZM150 132L160 132L155 130L146 130ZM170 132L180 132L174 130L164 130ZM190 132L200 132L192 130L183 130Z' fill='%23fff' opacity='0.11'/%3E%3Cpath d='M8 130L17 130L23 128L15 128ZM26 130L36 130L40 128L32 128ZM45 130L54 130L57 128L49 128ZM63 130L72 130L75 128L66 128ZM82 130L91 130L92 128L83 128ZM100 130L109 130L109 128L100 128ZM118 130L128 130L126 128L117 128ZM137 130L146 130L143 128L134 128ZM155 130L164 130L160 128L151 128ZM174 130L183 130L177 128L168 128ZM192 130L201 130L194 128L185 128Z' fill='%23fff' opacity='0.1'/%3E%3Cpath d='M7 128L15 128L21 126L13 126ZM24 128L32 128L37 126L29 126ZM41 128L49 128L53 126L45 126ZM58 128L66 128L68 126L60 126ZM75 128L83 128L84 126L76 126ZM92 128L100 128L100 126L92 126ZM109 128L117 128L116 126L108 126ZM126 128L134 128L132 126L124 126ZM143 128L151 128L147 126L140 126ZM160 128L168 128L163 126L155 126ZM177 128L185 128L179 126L171 126ZM194 128L202 128L195 126L187 126Z' fill='%23fff' opacity='0.09'/%3E%3Cpath d='M5 126L13 126L19 125L11 125ZM21 126L29 126L33 125L26 125ZM37 126L45 126L48 125L41 125ZM53 126L60 126L63 125L56 125ZM68 126L76 126L78 125L70 125ZM84 126L92 126L93 125L85 125ZM100 126L108 126L107 125L100 125ZM116 126L124 126L122 125L115 125ZM132 126L140 126L137 125L130 125ZM147 126L155 126L152 125L144 125ZM163 126L171 126L167 125L159 125ZM179 126L187 126L181 125L174 125ZM195 126L203 126L196 125L189 125Z' fill='%23fff' opacity='0.08'/%3E%3Crect y='125' width='200' height='53' fill='url(%23far)'/%3E%3Crect y='124' width='200' height='1.2' fill='%23fff' opacity='.55'/%3E%3C/svg%3E") center / 100% 100% no-repeat; }
/* founders-hall:end */
.look[data-backdrop='founders'] .look-bg::after { background: radial-gradient(circle at 50% 46%, transparent 40%, rgba(0, 0, 0, 0.5) 100%); }
.look[data-backdrop='dawn'] .look-bg::after, .look[data-backdrop='sunset'] .look-bg::after,
.look[data-backdrop='northern'] .look-bg::after, .look[data-backdrop='foil'] .look-bg::after { background: radial-gradient(circle at 50% 110%, rgba(0, 0, 0, 0.35), transparent 60%); }

/* ---- borders: a ring is a filled disc with its middle cut out ---- */
.look-ring, .look-ring-inner, .look-ring-line {
  --w: calc(var(--s) * 0.05);
  position: absolute; inset: 0; border-radius: 50%;
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - var(--w)), #000 calc(100% - var(--w) + 0.6px));
  mask: radial-gradient(farthest-side, transparent calc(100% - var(--w)), #000 calc(100% - var(--w) + 0.6px));
}
.look-ring-inner { display: none; }

.look[data-border='plain'] .look-ring { inset: calc(var(--s) * 0.02); --w: calc(var(--s) * 0.04); background: #71717a; }
.look[data-border='mint'] .look-ring { inset: calc(var(--s) * 0.015); background: #6ee7b7; }
.look[data-border='line'] .look-ring { inset: calc(var(--s) * 0.015); background: #38bdf8; }
.look-dot {
  position: absolute; top: 50%; width: calc(var(--s) * 0.15); height: calc(var(--s) * 0.15); margin-top: calc(var(--s) * -0.075);
  border-radius: 50%; background: #0e0e12; border: calc(var(--s) * 0.035) solid #38bdf8;
}
.look-dot-left { left: calc(var(--s) * -0.04); }
.look-dot-right { right: calc(var(--s) * -0.04); }
.look[data-border='platform'] .look-ring { --w: calc(var(--s) * 0.065); background: repeating-conic-gradient(#facc15 0deg 12deg, #18181b 12deg 24deg); }
.look[data-border='track'] .look-ring { --w: calc(var(--s) * 0.065); background: repeating-conic-gradient(#a78bfa 0deg 7deg, #2a2440 7deg 12deg); }
.look[data-border='ticket'] .look-ring {
  --w: calc(var(--s) * 0.07);
  background: radial-gradient(circle at 50% 0, #0e0e12 0 5%, transparent 5.5%), repeating-conic-gradient(from 7.5deg, #c4b5fd 0deg 11deg, transparent 11deg 15deg), #7c3aed;
}
.look[data-border='twotone'] .look-ring { background: conic-gradient(#f472b6 0 50%, #38bdf8 50% 100%); }
.look[data-border='twotone'] .look-ring-inner { display: block; inset: calc(var(--s) * 0.062); --w: calc(var(--s) * 0.016); background: #f4f4f5; }
.look[data-border='neon'] .look-ring { inset: calc(var(--s) * 0.01); --w: calc(var(--s) * 0.035); background: #f472b6; filter: drop-shadow(0 0 calc(var(--s) * 0.05) #f472b6); }
.look[data-border='neon'] .look-ring-inner { display: block; inset: calc(var(--s) * 0.062); --w: calc(var(--s) * 0.016); background: #fbcfe8; }
.look[data-border='ice'] .look-ring { --w: calc(var(--s) * 0.06); background: conic-gradient(from 40deg, #e0f2fe, #7dd3fc, #f0f9ff, #38bdf8, #bae6fd, #e0f2fe); filter: drop-shadow(0 0 calc(var(--s) * 0.04) rgba(125, 211, 252, 0.8)); }
.look[data-border='fire'] .look-ring { --w: calc(var(--s) * 0.07); background: conic-gradient(from 210deg, #f97316, #ef4444, #f59e0b, #fde047, #f97316, #ef4444, #f97316); filter: drop-shadow(0 0 calc(var(--s) * 0.05) rgba(249, 115, 22, 0.7)); }
.look[data-border='rainbow'] .look-ring { --w: calc(var(--s) * 0.07); background: conic-gradient(#f87171, #fbbf24, #a3e635, #34d399, #38bdf8, #818cf8, #e879f9, #f87171); }
.look[data-border='gold'] .look-ring { --w: calc(var(--s) * 0.075); background: conic-gradient(from 20deg, #fde68a, #b45309, #fbbf24, #fff7d6, #d97706, #fde68a, #92400e, #fbbf24, #fde68a); filter: drop-shadow(0 0 calc(var(--s) * 0.06) rgba(251, 191, 36, 0.65)); }
.look[data-border='gold'] .look-ring-inner { display: block; inset: calc(var(--s) * 0.092); --w: calc(var(--s) * 0.024); background: repeating-conic-gradient(#fde68a 0deg 2deg, transparent 2deg 15deg); }
/* The Founders Ring: a platinum bezel. A bright band turned like a watch case, a black channel cut with fine
   marks like the edge of a dial, a hairline inside, and an onyx stone set at the top. */
.look[data-border='founders'] .look-ring {
  --w: calc(var(--s) * 0.044);
  background: conic-gradient(from 20deg, #ffffff, #9a9da6 8%, #f6f6f8 17%, #70737c 27%, #ffffff 36%, #a9acb4 45%, #fbfbfc 54%, #7b7e87 65%, #ffffff 75%, #9a9da6 87%, #ffffff);
  filter: drop-shadow(0 0 calc(var(--s) * 0.035) rgba(255, 255, 255, 0.5));
}
.look[data-border='founders'] .look-ring-inner {
  display: block; inset: calc(var(--s) * 0.044); --w: calc(var(--s) * 0.024);
  background: repeating-conic-gradient(from -0.6deg, #e4e4e7 0deg 1.2deg, #08080a 1.2deg 5deg);
}
.look[data-border='founders'] .look-ring-line { inset: calc(var(--s) * 0.068); --w: calc(var(--s) * 0.012); background: #ffffff; }
.look-gem {
  position: absolute; left: 50%; top: calc(var(--s) * -0.03);
  width: calc(var(--s) * 0.14); height: calc(var(--s) * 0.14); margin-left: calc(var(--s) * -0.07);
  background: conic-gradient(from 45deg, #ffffff, #a4a7b0, #ffffff, #7f828b, #ffffff);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}
.look-gem::before, .look-gem::after { content: ''; position: absolute; clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.look-gem::before { inset: 17%; background: linear-gradient(135deg, #2c2c33, #000000 55%, #17171c); }
.look-gem::after { inset: 41%; background: #ffffff; }
/* The small crown that sits on the Golden Ring. */
.look-crown {
  position: absolute; left: 50%; top: calc(var(--s) * -0.13);
  width: calc(var(--s) * 0.34); height: calc(var(--s) * 0.24); margin-left: calc(var(--s) * -0.17);
  background: linear-gradient(180deg, #fde68a, #f59e0b);
  clip-path: polygon(6% 100%, 0 22%, 26% 56%, 50% 0, 74% 56%, 100% 22%, 94% 100%);
  filter: drop-shadow(0 0 1px #92400e);
}
