/* RYN Extras — search circle + cube section. Accent = RYN word colour. */
:root { --ryn-accent: #c88a75; --ryn-ink: #2c221e; --ryn-bg: #fdfbf7; }

/* ---------- Floating search circle (top-right, under pinned logo) ---------- */
.ryn-search-dock {
	position: fixed; top: 137px; right: 16px; z-index: 999997;
	width: 48px; height: 48px; touch-action: none; cursor: grab;
}
.ryn-search-dock:active { cursor: grabbing; }
.ryn-search-dock[hidden], .ryn-search-show[hidden] { display: none !important; }
.ryn-search-fab {
	width: 48px; height: 48px; border-radius: 50%;
	background: #fff; color: var(--ryn-accent);
	border: 2px solid var(--ryn-accent); cursor: pointer;
	box-shadow: 0 4px 20px rgba(200,138,117,.35);
	display: flex; align-items: center; justify-content: center;
	transition: transform .3s ease, box-shadow .3s ease;
}
.ryn-search-fab:hover { transform: scale(1.1); box-shadow: 0 8px 30px rgba(200,138,117,.55); }
.ryn-search-fab img { width: 22px; height: 22px; display: block; pointer-events: none; }
/* Dismiss ✖ corner badge */
.ryn-search-x {
	position: absolute; top: -7px; right: -7px; width: 20px; height: 20px;
	border-radius: 50%; background: #2c221e; color: #fff;
	border: 1px solid #fff; cursor: pointer; font: 700 12px/1 system-ui, sans-serif;
	display: flex; align-items: center; justify-content: center;
	box-shadow: 0 2px 8px rgba(0,0,0,.3); z-index: 2;
}
.ryn-search-x:hover { background: #c88a75; color: #2c221e; }
/* Bring-back button, hidden until dismissed */
.ryn-search-show {
	position: fixed; top: 137px; right: 16px; z-index: 999997;
	width: 48px; height: 48px; border-radius: 50%;
	background: #fff; color: var(--ryn-accent); border: 2px solid var(--ryn-accent);
	box-shadow: 0 4px 20px rgba(200,138,117,.35); cursor: pointer;
	display: flex; align-items: center; justify-content: center;
	font-size: 1.1rem; line-height: 1;
}

.ryn-search-panel {
	position: fixed; inset: 0; z-index: 9999998;
	background: rgba(44,34,30,.62); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
	display: flex; align-items: flex-start; justify-content: center; padding: 96px 16px 20px;
}
.ryn-search-panel[hidden] { display: none; }
.ryn-search-box {
	width: min(560px, 100%); background: #fff; border-radius: 18px;
	border: 2px solid var(--ryn-accent); box-shadow: 0 22px 70px rgba(44,34,30,.4);
	padding: 18px; box-sizing: border-box;
}
.ryn-search-field { display: flex; align-items: center; gap: 10px; border-bottom: 1px solid #efe7e1; padding-bottom: 12px; }
.ryn-search-field svg { width: 20px; height: 20px; color: var(--ryn-accent); flex: 0 0 auto; }
.ryn-search-field input { flex: 1 1 auto; min-width: 0; border: 0; outline: 0; font-size: 1rem; color: var(--ryn-ink); background: transparent; }
.ryn-search-field button { border: 0; background: #f7ede6; color: var(--ryn-ink); border-radius: 50%; width: 30px; height: 30px; cursor: pointer; flex: 0 0 auto; }
.ryn-search-results { margin-top: 14px; max-height: 50vh; overflow-y: auto; }
.ryn-search-empty, .ryn-search-status { color: #8a7a70; font-size: .9rem; margin: 8px 0; }
.ryn-search-result { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 10px; text-decoration: none; color: var(--ryn-ink); }
.ryn-search-result:hover { background: #fdf6f2; }
.ryn-search-result img { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; flex: 0 0 auto; background: #f7f2ee; }
.ryn-search-result span { font-size: .92rem; font-weight: 600; line-height: 1.3; }
.ryn-search-result small { display: block; color: var(--ryn-accent); font-weight: 700; margin-top: 2px; }
.ryn-search-all { margin-top: 12px; text-align: center; }
.ryn-search-all button { background: var(--ryn-ink); color: #fff; border: 0; border-radius: 999px; padding: 10px 22px; font-weight: 700; cursor: pointer; }

/* ---------- Six-face cube section ---------- */
.ryn-cube-section {
	--ryn-cube-size: clamp(230px, 30vw, 320px);
	background: radial-gradient(circle at 18% 16%, rgba(200,138,117,.28), transparent 34%),
	            radial-gradient(circle at 86% 84%, rgba(200,138,117,.18), transparent 42%),
	            linear-gradient(140deg, #2c221e 0%, #4a352d 48%, #1c1512 100%);
	color: #fdfbf7; padding: clamp(64px, 8vw, 100px) 20px clamp(40px, 6vw, 70px); text-align: center;
	overflow: hidden; position: relative; margin-top: 40px;
}
.ryn-cube-intro { max-width: 680px; margin: 0 auto 20px; }
.ryn-cube-eyebrow { color: var(--ryn-accent); font-size: .78rem; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; margin: 0 0 10px; }
.ryn-cube-intro h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0 0 10px; line-height: 1.1; }
.ryn-cube-intro p:last-child { color: #e8d8cf; margin: 0; }
/* Room for the rotated cube: diagonal reaches ~1.73x the face size. */
.ryn-cube-stage {
	display: grid; place-items: center;
	height: calc(var(--ryn-cube-size) * 1.65);
	perspective: 1300px; perspective-origin: 50% 50%;
}
.ryn-cube-scene {
	width: var(--ryn-cube-size); height: var(--ryn-cube-size);
	position: relative; transform-style: preserve-3d;
	filter: drop-shadow(0 24px 26px rgba(0,0,0,.5));
}
.ryn-cube {
	width: 100%; height: 100%; position: relative;
	transform-style: preserve-3d; cursor: grab; touch-action: none;
	outline: none; will-change: transform;
	transform: rotateX(-24deg) rotateY(32deg);
}
.ryn-cube:active { cursor: grabbing; }
.ryn-cube:focus-visible { outline: 3px solid var(--ryn-accent); outline-offset: 24px; border-radius: 8px; }
.ryn-cube-face {
	position: absolute; inset: 0; margin: 0; padding: 0;
	display: flex; align-items: center; justify-content: center;
	backface-visibility: hidden; overflow: hidden; box-sizing: border-box;
	background: linear-gradient(135deg, #fffdfb 0%, #f6e7df 100%);
	border: clamp(6px, 1.2vw, 10px) solid var(--ryn-accent);
	box-shadow: inset 0 0 0 2px rgba(255,255,255,.9), inset 0 0 34px rgba(200,138,117,.22);
}
.ryn-cube-face img { width: 78%; height: 78%; object-fit: contain; pointer-events: none; user-select: none; -webkit-user-drag: none; }
/* Each face sits exactly half a face-width from the centre. */
.ryn-face-front  { transform: translateZ(calc(var(--ryn-cube-size) / 2)); }
.ryn-face-right  { transform: rotateY(90deg)  translateZ(calc(var(--ryn-cube-size) / 2)); }
.ryn-face-back   { transform: rotateY(180deg) translateZ(calc(var(--ryn-cube-size) / 2)); }
.ryn-face-left   { transform: rotateY(-90deg) translateZ(calc(var(--ryn-cube-size) / 2)); }
.ryn-face-top    { transform: rotateX(90deg)  translateZ(calc(var(--ryn-cube-size) / 2)); }
.ryn-face-bottom { transform: rotateX(-90deg) translateZ(calc(var(--ryn-cube-size) / 2)); }
.ryn-cube-hint { color: #d8c4b8; font-size: .9rem; letter-spacing: .04em; margin: 0; }
@media (max-width: 600px) {
	.ryn-cube-section { --ryn-cube-size: min(66vw, 280px); }
	.ryn-search-fab { top: 137px; right: 16px; }
}
