/* Portal HOME page-specific overrides matching final Sprint 1 layout. */

:root {
	--home-bg: #f5f5f3;
	--home-card: #ffffff;
	--home-border: #e5e7eb;
	--home-text: #101828;
	--home-muted: #667085;
	--home-accent: #c8a96a;
}

body {
	background: var(--home-bg);
	color: var(--home-text);
}

.portal-layout {
	grid-template-columns: 248px 1fr;
}

.portal-sidebar {
	padding: 18px 12px;
	border-right: 1px solid rgba(255, 255, 255, 0.08);
	background:
		radial-gradient(circle at 14% 0%, rgba(200, 169, 106, 0.2), transparent 35%),
		linear-gradient(160deg, #0c0f16 0%, #0c1a2d 48%, #09111d 100%);
}

.sidebar-brand {
	margin: 0 8px;
	padding: 0 0 14px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.sidebar-logo {
	width: 138px;
	margin: 2px auto 0;
	border-radius: 2px;
}

.sidebar-brand p {
	margin-top: 10px;
	font-size: 11px;
	text-align: center;
	letter-spacing: 0.15em;
}

.sidebar-nav {
	margin-top: 12px;
	gap: 4px;
}

.sidebar-nav a {
	min-height: 42px;
	padding: 8px 10px;
	border-radius: 9px;
	align-items: flex-start;
	gap: 10px;
	color: rgba(255, 255, 255, 0.94);
	font-size: 14px;
	line-height: 1.15;
}

.sidebar-nav a svg {
	margin-top: 2px;
	color: rgba(255, 255, 255, 0.9);
}

.sidebar-nav a span {
	display: block;
	font-size: 15px;
	font-weight: 800;
}

.sidebar-nav a small {
	display: block;
	margin-top: 1px;
	color: rgba(255, 255, 255, 0.68);
	font-size: 11px;
	font-weight: 600;
}

.sidebar-nav a.active {
	background: linear-gradient(90deg, rgba(8, 161, 82, 0.95), rgba(5, 122, 66, 0.95));
	border: none;
	box-shadow: none;
}

.sidebar-version {
	margin: 14px 12px 0;
	padding-top: 12px;
	border-top: 1px solid rgba(255, 255, 255, 0.12);
	text-align: center;
	font-size: 11px;
}

.portal-home-page {
    gap: 16px;
    padding: 16px 18px;
    max-width: 1500px;
    width: 100%;
    margin: 0 auto;
}

.portal-header {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 320px 340px;
	gap: 16px;
	padding: 0;
	border: none;
	background: transparent;
	box-shadow: none;
	align-items: stretch;
}

.header-greeting-card,
.header-time-card,
.header-user-card,
.kpi-card,
.attendance-card,
.weather-card,
.notice-card,
.academy-card,
.schedule-card {
	background: var(--home-card);
	border: 1px solid var(--home-border);
	border-radius: 16px;
	box-shadow: 0 2px 8px rgba(16, 24, 40, 0.04);
}

.header-greeting-card,
.header-time-card,
.header-user-card {
	min-height: 110px;
	padding: 18px 20px;
}

.header-greeting-card {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 0;
	padding: 24px 28px;
}


.header-greeting-copy {
	display: flex;
	align-items: center;
	height: 100%;
}

.header-greeting-copy h1 {
	display: flex;
	align-items: center;
	margin: 0;
	color: #101828;
	line-height: 1.2;
}

#greetingText {
	display: inline;
	font-size: 28px;
	font-weight: 900;
	line-height: 1.2;
	margin: 0;
}

#greetingName {
	display: inline;
	font-size: 28px;
	font-weight: 900;
	line-height: 1.2;
	margin-left: 14px;
}

.header-time-card {
	display: grid;
	justify-items: center;
	align-content: center;
	gap: 8px;
	text-align: center;
}

.header-time strong {
	font-size: clamp(32px, 2.2vw, 42px);
	font-weight: 900;
	line-height: 1;
	font-variant-numeric: tabular-nums;
}

.header-time span {
	display: block;
	margin-top: 8px;
	font-size: 13px;
	font-weight: 700;
	color: var(--home-muted);
}

.header-city-summary a {
	color: #0f766e;
	font-size: 13px;
	font-weight: 800;
	text-decoration: none;
}

.header-user-card {
	display: grid;
	grid-template-columns: auto 1fr;
	grid-template-areas:
		"icon name"
		"tools tools";
	gap: 10px 12px;
	align-items: center;
}

.header-user-icon {
	grid-area: icon;
	width: 40px;
	height: 40px;
	border-radius: 999px;
	background: #eef2ff;
	color: #1d4ed8;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.header-user-card strong {
	grid-area: name;
	font-size: 18px;
	font-weight: 900;
}

.header-tools {
	grid-area: tools;
	display: flex;
	justify-content: flex-end;
	align-items: center;
	gap: 8px;
}

.icon-action {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: 1px solid var(--home-border);
	background: #fff;
	color: #111827;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	position: relative;
}

.icon-action em {
	position: absolute;
	right: -2px;
	top: -2px;
	width: 16px;
	height: 16px;
	border-radius: 999px;
	background: #ef4444;
	color: #fff;
	font-style: normal;
	font-size: 10px;
	font-weight: 700;
	line-height: 16px;
}

.logout-action {
	min-height: 36px;
	padding: 0 12px;
	border: 1px solid var(--home-border);
	border-radius: 999px;
	background: #fff;
	color: #111827;
	font-size: 12px;
	font-weight: 800;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.home-quote-row {
	display: block;
}

.home-columns {
	display: grid;
	grid-template-columns: 380px 720px 340px;
	gap: 16px;
	align-items: start;
	justify-content: center;
}

.home-column {
	display: grid;
	gap: 16px;
	min-width: 0;
}

.goal-pair {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
}

.kpi-card {
	padding: 14px 18px;
}

.quote-card {
	min-height: 116px;
}

.goal-card {
	min-height: 124px;
}

.kpi-head {
	margin: 0;
	font-size: 13px;
	font-weight: 800;
	color: #101828;
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.kpi-head svg {
	width: 14px;
	height: 14px;
	color: #16a34a;
}

.quote-card .kpi-title{
    margin-top:16px;
    max-height:none;
    overflow:visible;
}

.quote-subline {
	margin: 6px 0 0;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.3;
	color: #475467;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.goal-card h3 {
	margin: 10px 0 6px;
	font-size: 24px;
	line-height: 1.2;
}

.goal-card p {
	margin: 0;
	font-size: 13px;
	line-height: 1.45;
	color: #475467;
}


.home-column-right .notice-card,
.home-column-center .schedule-card {
	padding: 16px;
}

.home-hidden-event {
	display: none;
}

.attendance-card,
.weather-card,
.notice-card,
.academy-card,
.schedule-card {
	padding: 16px;
}

.attendance-card {
	min-height: 260px;
}

.card-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 10px;
}

.card-head h2 {
	margin: 0;
	font-size: 18px;
}

.mini-kicker {
	margin: 0 0 4px;
	font-size: 13px;
	font-weight: 900;
	letter-spacing: 0.02em;
	color: #111827;
}

.status-badge {
	font-size: 13px;
	font-weight: 900;
}

.attendance-card[data-state="pending"] #workStatus {
	background: #e5e7eb;
	color: #374151;
}

.attendance-card[data-state="working"] #workStatus {
	background: #dcfce7;
	color: #166534;
}

.attendance-card[data-state="break"] #workStatus {
	background: #fff7ed;
	color: #c2410c;
}

.attendance-card[data-state="done"] #workStatus {
	background: #dbeafe;
	color: #1d4ed8;
}

.attendance-actions {
	margin-top: 14px;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
}

.attendance-actions primary-button,
.attendance-actions .btn {
	display: block;
	width: 100%;
}

.btn {
	width: 100%;
	min-height: 60px;
	border-radius: 10px;
	font-size: 17px;
	font-weight: 800;
	box-sizing: border-box;
}

.btn-start {
	background: linear-gradient(180deg, #20b05a, #15803d);
	color: #fff;
	border: 1px solid #15803d;
}

.btn-break {
	background: #fff;
	color: #111827;
	border: 1px solid #e5e7eb;
}

.btn-return {
	background: #eff6ff;
	color: #1d4ed8;
	border: 1px solid #bfdbfe;
}

.btn-end {
	background: #fff1f2;
	color: #e11d48;
	border: 1px solid #fecdd3;
}

.attendance-card .btn.is-current {
	box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.18), 0 0 0 1px rgba(22, 163, 74, 0.45) inset;
	transform: translateY(-1px) scale(1.01);
}

.btn:disabled,
.btn[disabled] {
	opacity: 0.52;
	filter: grayscale(0.08);
}

.time-summary {
	margin-top: 12px;
	display: grid;
	grid-template-columns: 1fr;
}

.time-summary div {
	background: #ecfdf3;
	border: 1px solid #cfe9d8;
	border-radius: 10px;
	padding: 9px 12px;
	display: grid;
	grid-template-columns: auto auto;
	justify-content: start;
	align-items: center;
	column-gap: 8px;
}

.time-summary em,
.attendance-break-info {
	display: none;
}

.time-summary span {
	font-size: 12px;
	color: #067647;
}

.time-summary strong {
	font-size: 14px;
	margin-top: 0;
}

.attendance-footer-actions {
	margin-top: 10px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 8px;
}

.link-button,
.dev-reset-button {
	font-size: 11px;
}

.weather-card {
	min-height: 336px;
}

.panel-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 8px;
}

.panel-head h3 {
	margin: 0;
	font-size: 18px;
	display: inline-flex;
	align-items: center;
	gap: 7px;
}

.panel-head a {
	font-size: 12px;
	text-decoration: none;
}

.weather-list {
	display: grid;
	grid-template-columns: repeat(7, minmax(36px, 1fr));
	gap: 5px;
}

.weather-day {
	min-height: 86px;
	min-width: 0;
	padding: 6px 3px;
	border-radius: 8px;
	gap: 2px;
}

.weather-day-label {
	font-size: 10px;
}

.weather-day .weather-icon {
	font-size: 14px;
}

.weather-day-caption,
.weather-temp {
	font-size: 10px;
}

.weather-updated {
	margin-top: 8px;
	font-size: 11px;
}

.schedule-card {
	height: 848px;
	max-width: 100%;
	overflow: hidden;
}

.schedule-head {
	margin-bottom: 10px;
}

.schedule-head h3 span {
	color: #475467;
	font-size: 12px;
	font-weight: 600;
}

.schedule-months {
	display: grid;
	gap: 16px;
}

.calendar-month {
	height: 400px;
}

.calendar-shell {
	border: 1px solid var(--home-border);
	border-radius: 10px;
	overflow: hidden;
	max-width: 100%;
	background: #fff;
}

.calendar-toolbar {
	min-height: 44px;
	border-bottom: 1px solid var(--home-border);
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 16px;
	background: #fff;
}

.calendar-toolbar button {
	border: none;
	background: transparent;
	font-size: 20px;
	color: #344054;
}

.calendar-toolbar strong {
	font-size: 18px;
	font-weight: 800;
}

.calendar-grid {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	width: 100%;
}

.calendar-grid > span {
	min-height: 50px;
	padding: 8px;
	border-right: 1px solid var(--home-border);
	border-bottom: 1px solid var(--home-border);
	font-size: 12px;
	font-weight: 600;
	color: #111827;
}

.calendar-grid > span:nth-child(7n) {
	border-right: none;
}

.calendar-grid > span.muted {
	color: #98a2b3;
}



/* =========================================================
   Portal HOME / お知らせカード
   ========================================================= */

.notice-card {
	position: relative;
	min-height: 500px;
	padding: 16px 16px 54px;
	overflow: hidden;
}

.notice-list {
	list-style: none;
	margin: 14px 0 0;
	padding: 0;
	display: grid;
	gap: 10px;
}

.notice-list > .notice-item {
	display: block;
	min-width: 0;
	padding: 0;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	background: #ffffff;
	overflow: hidden;
	transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.notice-list > .notice-item:hover {
	transform: translateY(-2px);
	border-color: #d0d5dd;
	box-shadow: 0 9px 22px rgba(16, 24, 40, 0.08);
}

.notice-link-wrap {
	appearance: none;
	display: grid;
	grid-template-columns: 70px 1fr 20px;
    grid-template-areas: "date body arrow";
	align-items: center;
	column-gap: 14px;
	width: 100%;
	min-width: 0;
	padding: 14px;
	border: 0;
	background: transparent;
	text-align: left;
	font: inherit;
	cursor: pointer;
	box-sizing: border-box;
}

.notice-date {
	grid-area: date;
	display: flex;
	align-items: center;
	justify-content: center;
	align-self: stretch;
	padding-right: 12px;
	border-right: 1px solid #eaecf0;
	color: #98a2b3;
	font-size: 12px;
	font-weight: 800;
	white-space: nowrap;
}

.notice-body {
	grid-area: body;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: flex-start;
	flex: 1;
	width: 100%;
	min-width: 0;
	overflow: hidden;
}

.notice-meta {
	display: flex;
	align-items: center;
	gap: 5px;
	min-height: 18px;
	margin: 0 0 5px;
}

.notice-title {
	display: -webkit-box;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	margin: 0;
	color: #1f2937;
	font-size: 14px;
	font-weight: 800;
	line-height: 1.4;
	white-space: normal;
	overflow: hidden;
	-webkit-line-clamp: 1;
	-webkit-box-orient: vertical;
}

.notice-body p,
.notice-text {
	display: -webkit-box;
	margin: 4px 0 0;
	overflow: hidden;
	color: #667085;
	font-size: 11px;
	font-weight: 600;
	line-height: 1.55;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 1;
    max-width: 100%;
}

.notice-new,
.notice-important {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 17px;
	padding: 0 5px;
	border-radius: 999px;
	font-size: 8px;
	font-weight: 900;
	white-space: nowrap;
}

.notice-new { background: #ef4444; color: #fff; }
.notice-important { background: #fff1f2; color: #e11d48; border: 1px solid #fecdd3; }

.notice-link {
	grid-area: arrow;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #cbd5e1;
	font-size: 20px;
	font-weight: 700;
	line-height: 1;
	transition: color 160ms ease, transform 160ms ease;
}

.notice-item:hover .notice-link {
	color: #16a34a;
	transform: translateX(2px);
}

.notice-modal {
	position: fixed;
	inset: 0;
	z-index: 10000;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.notice-modal.is-open { display: flex; }

.notice-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.45);
	backdrop-filter: blur(4px);
}

.notice-modal-dialog {
	position: relative;
	z-index: 1;
	width: min(560px, 100%);
	max-height: calc(100vh - 40px);
	overflow: auto;
	border-radius: 22px;
	background: #fff;
	box-shadow: 0 24px 64px rgba(15, 23, 42, 0.22);
	padding: 28px;
}

.notice-modal-close {
	position: absolute;
	top: 14px;
	right: 14px;
	width: 36px;
	height: 36px;
	border: 0;
	border-radius: 999px;
	background: #f3f4f6;
	font-size: 22px;
	cursor: pointer;
}

.notice-modal-icon { font-size: 28px; }
.notice-modal-dialog h2 { margin: 14px 44px 0 0; font-size: 24px; }
.notice-modal-body { margin: 18px 0 0; line-height: 1.9; white-space: pre-wrap; }
.notice-modal-meta { margin-top: 22px; padding: 14px 16px; border-radius: 14px; background: #f8fafc; display: grid; gap: 5px; }
.notice-modal-meta span { color: #667085; font-size: 12px; font-weight: 800; }
.notice-modal-meta strong { color: #1f2937; font-size: 14px; }
.notice-modal-button {
	display: block;
	min-width: 120px;
	min-height: 42px;
	margin: 22px 0 0 auto;
	border: 0;
	border-radius: 999px;
	background: #1e3a8a;
	color: #fff;
	font-weight: 800;
	cursor: pointer;
}
.notice-modal-open { overflow: hidden; }

@media (max-width: 760px) {
	.notice-link-wrap {
		grid-template-columns: 50px minmax(0, 1fr) 18px;
		column-gap: 10px;
		padding: 11px;
	}
	.notice-date {
		padding-right: 9px;
		font-size: 11px;
	}
	.notice-title { font-size: 13px; }
	.notice-body p,
	.notice-text { font-size: 10px; }
}

.academy-card {
	min-height: 220px;
}

.academy-entry-card {
	height: 100%;
	display: grid;
	grid-template-columns: 1fr;
	gap: 14px;
	text-decoration: none;
	align-items: stretch;
}

.academy-meta h3 {
	margin: 0;
	font-size: 18px;
	color: #101828;
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.academy-metrics {
	display: grid;
	gap: 14px;
	margin-top: 12px;
}

.academy-metrics p {
	margin: 0 0 5px;
	font-size: 11px;
	color: #667085;
}

.academy-metrics strong {
	display: block;
	margin-bottom: 6px;
	font-size: 13px;
	color: #111827;
}

.academy-progress {
	height: 8px;
	border-radius: 999px;
	background: #e5e7eb;
	overflow: hidden;
}

.academy-progress-bar {
	display: block;
	height: 100%;
	border-radius: inherit;
}

.academy-progress-bar-view {
	width: 65%;
	background: linear-gradient(90deg, #0f9d58, #22c55e);
}

.academy-progress-bar-test {
	width: 72%;
	background: linear-gradient(90deg, #2563eb, #60a5fa);
}

.academy-cta {
	min-height: 42px;
	border-radius: 10px;
	border: 1px solid var(--home-border);
	background: #fff;
	color: #111827;
	font-size: 13px;
	font-weight: 800;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
}

@media (max-width: 1360px) {
	.portal-layout {
		grid-template-columns: 224px 1fr;
	}

	.portal-header,
	.home-columns {
		grid-template-columns: 1fr;
	}

	.goal-pair {
		grid-template-columns: 1fr;
	}

	.schedule-card {
		height: auto;
	}

	.calendar-month {
		height: auto;
	}
}

@media (max-width: 760px) {
	.portal-home-page {
		padding: 10px;
	}

	.home-columns,
	.goal-pair {
		grid-template-columns: 1fr;
	}

	.attendance-actions {
		grid-template-columns: 1fr;
	}

	.schedule-card,
	.notice-card,
	.academy-card,
	.attendance-card,
	.weather-card {
		min-height: auto;
	}

	.calendar-grid > span {
		min-height: 36px;
		padding: 4px;
		font-size: 12px;
	}
}
.attendance-divider{
    margin:8px 0;
    border:none;
    border-top:1px solid #e5e7eb;
}


#presidentMessageText{
  font-size:22px;
  font-weight:700;
  line-height:1.8;
  color:#111827;
  margin-top:16px;
  white-space:pre-wrap;
}

/* =========================================================
   Portal HOME / Googleカレンダー動的表示
   ========================================================= */
.calendar-loading,
.calendar-empty-state {
  min-height: 180px;
  display: grid;
  place-items: center;
  padding: 24px;
  border: 1px dashed var(--home-border);
  border-radius: 10px;
  background: #fff;
  color: #667085;
  font-size: 13px;
  font-weight: 700;
}

.calendar-month {
  display: flex;
  flex-direction: column;
}

.calendar-weekdays {
  border-bottom: 1px solid var(--home-border);
  background: #f8fafc;
}

.calendar-weekdays > span {
  min-height: 28px;
  display: grid;
  place-items: center;
  padding: 4px;
  border-right: 1px solid var(--home-border);
  font-size: 11px;
  font-weight: 800;
  color: #475467;
}

.calendar-weekdays > span:last-child {
  border-right: none;
}

.calendar-weekdays .is-sunday {
  color: #b42318;
}

.calendar-weekdays .is-saturday {
  color: #175cd3;
}

.calendar-days {
  flex: 1;
  grid-auto-rows: minmax(48px, 1fr);
}

.calendar-day-cell {
  position: relative;
  min-width: 0;
  padding: 5px 4px 4px;
  border-right: 1px solid var(--home-border);
  border-bottom: 1px solid var(--home-border);
  background: #fff;
  overflow: hidden;
}

.calendar-day-cell:nth-child(7n) {
  border-right: none;
}

.calendar-day-cell:nth-last-child(-n + 7) {
  border-bottom: none;
}

.calendar-day-cell.is-muted {
  background: #f9fafb;
}

.calendar-day-cell.is-muted .calendar-day-number {
  color: #98a2b3;
}

.calendar-day-cell.is-today {
  background: #fffbeb;
  box-shadow: inset 0 0 0 2px #f79009;
}

.calendar-day-number {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  color: #101828;
  font-size: 11px;
  font-weight: 800;
}

.calendar-day-cell.is-today .calendar-day-number {
  background: #f79009;
  color: #fff;
}

.calendar-day-events {
  display: grid;
  gap: 2px;
  margin-top: 2px;
}

.calendar-event {
  display: flex;
  align-items: center;
  gap: 3px;
  min-width: 0;
  padding: 2px 3px;
  border-left: 3px solid #667085;
  border-radius: 3px;
  background: #f2f4f7;
  color: #344054;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none;
}

.calendar-event:hover {
  filter: brightness(0.97);
}

.calendar-event.is-meeting {
  border-left-color: #175cd3;
  background: #eff8ff;
  color: #1849a9;
}

.calendar-event.is-training {
  border-left-color: #7f56d9;
  background: #f4f3ff;
  color: #5925dc;
}

.calendar-event.is-event {
  border-left-color: #039855;
  background: #ecfdf3;
  color: #027a48;
}

.calendar-event-time {
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
}

.calendar-event-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-event-more {
  padding-left: 3px;
  color: #667085;
  font-size: 9px;
  font-weight: 700;
}

.calendar-month-summary {
  margin: 0;
  padding: 7px 10px;
  border-top: 1px solid var(--home-border);
  background: #f8fafc;
  color: #667085;
  font-size: 10px;
  font-weight: 700;
  text-align: right;
}

@media (max-width: 900px) {
  .calendar-event-time {
    display: none;
  }
}

/* =========================================================
   本人誕生日 / 全画面祝福モーダル
   ========================================================= */
body.birthday-celebration-open {
  overflow: hidden;
}

.birthday-celebration {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 24%, rgba(255, 255, 255, 0.94), rgba(255, 248, 236, 0.86) 34%, rgba(249, 222, 225, 0.9) 68%, rgba(226, 207, 236, 0.94) 100%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 280ms ease, visibility 280ms ease;
}

.birthday-celebration.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.birthday-celebration-sky {
  position: absolute;
  inset: -12%;
  background:
    radial-gradient(circle at 18% 24%, rgba(255, 255, 255, 0.82) 0 7%, transparent 18%),
    radial-gradient(circle at 82% 18%, rgba(255, 255, 255, 0.72) 0 6%, transparent 17%),
    radial-gradient(circle at 75% 82%, rgba(255, 240, 194, 0.55) 0 9%, transparent 22%),
    radial-gradient(circle at 22% 78%, rgba(255, 222, 229, 0.58) 0 10%, transparent 24%);
  animation: birthday-sky-breathe 8s ease-in-out infinite alternate;
}

.birthday-celebration-panel {
  position: relative;
  z-index: 4;
  width: min(680px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 38px 42px 34px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow:
    0 28px 80px rgba(88, 56, 81, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.96);
  text-align: center;
  backdrop-filter: blur(16px);
  transform: translateY(18px) scale(0.96);
  transition: transform 420ms cubic-bezier(0.2, 0.85, 0.25, 1.15);
}

.birthday-celebration.is-visible .birthday-celebration-panel {
  transform: translateY(0) scale(1);
}

.birthday-celebration-kicker {
  margin: 0;
  color: #a45872;
  font-size: clamp(13px, 1.5vw, 16px);
  font-weight: 900;
  letter-spacing: 0.28em;
}

.birthday-bouquet {
  position: relative;
  display: grid;
  place-items: center;
  width: 220px;
  height: 184px;
  margin: 6px auto -4px;
}

.birthday-bouquet-glow {
  position: absolute;
  width: 176px;
  height: 118px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 222, 125, 0.5), rgba(255, 218, 224, 0.16) 52%, transparent 72%);
  filter: blur(4px);
  animation: birthday-bouquet-glow 2.6s ease-in-out infinite alternate;
}

.birthday-bouquet-emoji {
  position: relative;
  z-index: 2;
  display: block;
  font-size: 118px;
  line-height: 1;
  filter: drop-shadow(0 18px 16px rgba(108, 69, 87, 0.18));
  transform-origin: 50% 90%;
  animation: birthday-bouquet-arrive 900ms cubic-bezier(0.2, 0.9, 0.25, 1.2) both,
    birthday-bouquet-float 3.2s 900ms ease-in-out infinite;
}

.birthday-bouquet-spark {
  position: absolute;
  z-index: 3;
  color: #d39a28;
  font-size: 28px;
  text-shadow: 0 0 16px rgba(245, 196, 74, 0.65);
  animation: birthday-sparkle 1.8s ease-in-out infinite;
}

.birthday-bouquet-spark-one { left: 12px; top: 52px; }
.birthday-bouquet-spark-two { right: 18px; top: 26px; animation-delay: -0.65s; }
.birthday-bouquet-spark-three { right: 38px; bottom: 28px; animation-delay: -1.1s; }

.birthday-celebration-panel h2 {
  margin: 4px 0 8px;
  color: #3f2836;
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 900;
  line-height: 1.2;
}

.birthday-celebration-main {
  margin: 0;
  color: #aa4263;
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 900;
  line-height: 1.45;
}

.birthday-celebration-message {
  max-width: 520px;
  margin: 16px auto 0;
  color: #5f4a57;
  font-size: clamp(15px, 1.8vw, 18px);
  font-weight: 700;
  line-height: 1.9;
}

.birthday-celebration-from {
  margin: 18px 0 0;
  color: #8b6f7f;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.birthday-celebration-close {
  min-width: 260px;
  min-height: 52px;
  margin-top: 24px;
  padding: 13px 24px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #b84f72, #8f4b86);
  box-shadow: 0 12px 24px rgba(150, 67, 108, 0.25);
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.birthday-celebration-close:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 28px rgba(150, 67, 108, 0.32);
  filter: brightness(1.04);
}

.birthday-celebration-close:focus-visible {
  outline: 3px solid rgba(92, 51, 115, 0.38);
  outline-offset: 4px;
}

.birthday-flower-cloud {
  position: absolute;
  z-index: 2;
  display: grid;
  gap: clamp(12px, 2.3vw, 34px);
  pointer-events: none;
}

.birthday-flower-cloud-left {
  left: clamp(-38px, 1vw, 28px);
  bottom: -26px;
  transform: rotate(-10deg);
}

.birthday-flower-cloud-right {
  right: clamp(-38px, 1vw, 28px);
  top: -20px;
  transform: rotate(10deg);
}

.birthday-flower-cloud span {
  display: block;
  font-size: clamp(44px, 7vw, 96px);
  line-height: 1;
  filter: drop-shadow(0 14px 12px rgba(84, 53, 76, 0.14));
  animation: birthday-flower-sway 4.8s ease-in-out infinite alternate;
}

.birthday-flower-cloud span:nth-child(2) { margin-left: 42px; animation-delay: -0.8s; }
.birthday-flower-cloud span:nth-child(3) { margin-left: 8px; animation-delay: -1.7s; }
.birthday-flower-cloud span:nth-child(4) { margin-left: 62px; animation-delay: -2.5s; }
.birthday-flower-cloud span:nth-child(5) { margin-left: 22px; animation-delay: -3.2s; }

.birthday-confetti {
  position: absolute;
  inset: 0;
  z-index: 3;
  overflow: hidden;
  pointer-events: none;
}

.birthday-confetti-piece {
  position: absolute;
  top: -12vh;
  left: var(--birthday-left);
  color: #c0547a;
  font-size: var(--birthday-size);
  line-height: 1;
  opacity: 0.82;
  transform: translate3d(0, -10vh, 0) rotate(var(--birthday-rotation));
  animation: birthday-confetti-fall var(--birthday-duration) linear infinite;
  animation-delay: var(--birthday-delay);
}

.birthday-confetti-piece:nth-child(4n + 2) { color: #e0a326; }
.birthday-confetti-piece:nth-child(4n + 3) { color: #6d8f68; }
.birthday-confetti-piece:nth-child(4n + 4) { color: #8d68a6; }

@keyframes birthday-sky-breathe {
  from { transform: scale(1) rotate(-1deg); }
  to { transform: scale(1.05) rotate(1deg); }
}

@keyframes birthday-bouquet-arrive {
  from { opacity: 0; transform: translateY(42px) scale(0.72) rotate(-8deg); }
  to { opacity: 1; transform: translateY(0) scale(1) rotate(0); }
}

@keyframes birthday-bouquet-float {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-8px) rotate(1deg); }
}

@keyframes birthday-bouquet-glow {
  from { opacity: 0.55; transform: scale(0.92); }
  to { opacity: 0.95; transform: scale(1.08); }
}

@keyframes birthday-sparkle {
  0%, 100% { opacity: 0.35; transform: scale(0.72) rotate(0deg); }
  50% { opacity: 1; transform: scale(1.18) rotate(24deg); }
}

@keyframes birthday-flower-sway {
  from { transform: rotate(-4deg) translateY(0); }
  to { transform: rotate(4deg) translateY(-12px); }
}

@keyframes birthday-confetti-fall {
  0% {
    opacity: 0;
    transform: translate3d(0, -12vh, 0) rotate(0deg);
  }
  12% { opacity: 0.9; }
  100% {
    opacity: 0.18;
    transform: translate3d(var(--birthday-drift), 118vh, 0) rotate(720deg);
  }
}

@media (max-width: 760px) {
  .birthday-celebration {
    padding: 14px;
  }

  .birthday-celebration-panel {
    max-height: calc(100vh - 28px);
    padding: 26px 18px 24px;
    border-radius: 24px;
  }

  .birthday-bouquet {
    width: 180px;
    height: 148px;
  }

  .birthday-bouquet-emoji {
    font-size: 94px;
  }

  .birthday-flower-cloud {
    opacity: 0.68;
  }

  .birthday-flower-cloud span {
    font-size: clamp(36px, 14vw, 64px);
  }

  .birthday-celebration-close {
    width: 100%;
    min-width: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .birthday-celebration,
  .birthday-celebration-panel,
  .birthday-celebration-sky,
  .birthday-bouquet-emoji,
  .birthday-bouquet-glow,
  .birthday-bouquet-spark,
  .birthday-flower-cloud span,
  .birthday-confetti-piece {
    animation: none !important;
    transition: none !important;
  }

  .birthday-confetti {
    display: none;
  }
}
