:root {
	--ink: #1f2a27;
	--ink-soft: #66716c;
	--paper: #f4f1ea;
	--surface: rgba(255, 255, 255, 0.82);
	--surface-solid: #fffdf8;
	--line: rgba(31, 42, 39, 0.13);
	--line-strong: rgba(31, 42, 39, 0.22);
	--accent: #bd4329;
	--accent-dark: #9b331f;
	--accent-pale: #fff0e9;
	--focus: #9b331f;
	--mint: #2d9b78;
	--mint-pale: #e6f5ee;
	--blue: #4678bf;
	--purple: #7556a8;
	--shadow: 0 24px 70px rgba(45, 47, 42, 0.09);
	--shadow-small: 0 12px 28px rgba(45, 47, 42, 0.08);
	--radius-large: 28px;
	--radius-medium: 18px;
	--radius-small: 12px;
	--font-display: Georgia, "Times New Roman", serif;
	--font-sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

[hidden] {
	display: none !important;
}

html {
	scroll-behavior: smooth;
}

body {
	min-width: 320px;
	margin: 0;
	color: var(--ink);
	background:
		linear-gradient(rgba(31, 42, 39, 0.025) 1px, transparent 1px),
		linear-gradient(90deg, rgba(31, 42, 39, 0.025) 1px, transparent 1px),
		var(--paper);
	background-size: 32px 32px;
	font-family: var(--font-sans);
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}

button,
input {
	font: inherit;
}

button,
a {
	-webkit-tap-highlight-color: transparent;
}

button {
	color: inherit;
}

button:not(:disabled),
a {
	cursor: pointer;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
	outline: 3px solid var(--focus);
	outline-offset: 3px;
}

svg {
	fill: none;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 1.8;
}

.page-glow {
	position: fixed;
	z-index: -1;
	width: 34rem;
	height: 34rem;
	border-radius: 50%;
	filter: blur(3px);
	pointer-events: none;
}

.page-glow-one {
	top: -16rem;
	right: -10rem;
	background: radial-gradient(circle, rgba(240, 100, 69, 0.15), transparent 70%);
}

.page-glow-two {
	top: 38rem;
	left: -18rem;
	background: radial-gradient(circle, rgba(45, 155, 120, 0.13), transparent 70%);
}

.site-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: min(1180px, calc(100% - 40px));
	margin: 0 auto;
	padding: 28px 0;
}

.brand {
	display: inline-flex;
	gap: 10px;
	align-items: center;
	color: var(--ink);
	font-size: 1.08rem;
	font-weight: 500;
	letter-spacing: -0.02em;
	text-decoration: none;
}

.brand strong {
	font-weight: 760;
}

.brand-mark {
	display: grid;
	width: 36px;
	height: 36px;
	place-items: center;
	color: white;
	background: var(--accent);
	border-radius: 11px;
	box-shadow: 0 7px 16px rgba(216, 75, 44, 0.22);
}

.brand-mark svg {
	width: 23px;
	height: 23px;
}

.storage-badge,
.size-pill,
.file-count {
	display: inline-flex;
	align-items: center;
	white-space: nowrap;
	border: 1px solid var(--line);
	border-radius: 999px;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.04em;
}

.storage-badge {
	gap: 8px;
	padding: 8px 13px;
	color: var(--ink-soft);
	background: rgba(255, 255, 255, 0.62);
	text-transform: uppercase;
}

.status-dot {
	width: 7px;
	height: 7px;
	background: var(--mint);
	border-radius: 50%;
	box-shadow: 0 0 0 4px rgba(45, 155, 120, 0.12);
}

main {
	width: min(1040px, calc(100% - 40px));
	margin: 0 auto;
}

.hero {
	max-width: 810px;
	margin: 72px auto 64px;
	text-align: center;
}

.eyebrow,
.section-kicker {
	font-size: 0.76rem;
	font-weight: 760;
	letter-spacing: 0.13em;
	text-transform: uppercase;
}

.eyebrow {
	display: inline-flex;
	gap: 8px;
	align-items: center;
	margin-bottom: 24px;
	padding: 8px 13px;
	color: var(--accent-dark);
	background: var(--accent-pale);
	border-radius: 999px;
}

.eyebrow span {
	font-size: 0.9rem;
}

.hero h1 {
	margin: 0;
	font-family: var(--font-display);
	font-size: clamp(3.25rem, 8vw, 6.1rem);
	font-weight: 400;
	line-height: 0.93;
	letter-spacing: -0.065em;
}

.hero h1 em {
	color: var(--accent);
	font-weight: 400;
}

.hero > p {
	max-width: 610px;
	margin: 27px auto 0;
	color: var(--ink-soft);
	font-size: 1.02rem;
	line-height: 1.75;
}

.upload-shell {
	position: relative;
	padding: 34px;
	background: var(--surface);
	border: 1px solid rgba(255, 255, 255, 0.9);
	border-radius: var(--radius-large);
	box-shadow: var(--shadow);
	backdrop-filter: blur(18px);
}

.upload-shell::before {
	position: absolute;
	inset: 10px;
	z-index: -1;
	content: "";
	border: 1px solid rgba(31, 42, 39, 0.04);
	border-radius: 22px;
	pointer-events: none;
}

.section-heading {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 24px;
}

.section-kicker {
	margin: 0 0 8px;
	color: var(--accent);
}

.section-heading h2 {
	margin: 0;
	font-family: var(--font-display);
	font-size: clamp(1.65rem, 4vw, 2.3rem);
	font-weight: 400;
	line-height: 1.1;
	letter-spacing: -0.035em;
}

.size-pill {
	padding: 7px 11px;
	color: var(--ink-soft);
	background: rgba(244, 241, 234, 0.74);
}

#upload-form {
	margin-top: 26px;
}

.drop-zone {
	display: flex;
	width: 100%;
	min-height: 230px;
	padding: 36px 24px;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	color: var(--ink);
	background: rgba(244, 241, 234, 0.5);
	border: 1.5px dashed var(--line-strong);
	border-radius: 20px;
	transition:
		background 180ms ease,
		border-color 180ms ease,
		transform 180ms ease,
		box-shadow 180ms ease;
}

.drop-zone:hover,
.drop-zone.is-dragging {
	background: var(--accent-pale);
	border-color: var(--accent);
	box-shadow: inset 0 0 0 1px rgba(240, 100, 69, 0.06);
	transform: translateY(-2px);
}

.drop-zone.is-dragging {
	box-shadow: 0 0 0 5px rgba(240, 100, 69, 0.08);
}

.drop-icon {
	display: grid;
	width: 64px;
	height: 64px;
	margin-bottom: 18px;
	place-items: center;
	color: var(--accent);
	background: var(--surface-solid);
	border-radius: 20px;
	box-shadow: var(--shadow-small);
}

.drop-icon svg {
	width: 33px;
	height: 33px;
}

.drop-title {
	font-family: var(--font-display);
	font-size: 1.45rem;
	letter-spacing: -0.025em;
}

.drop-help {
	margin-top: 7px;
	color: var(--ink-soft);
	font-size: 0.9rem;
}

.drop-help span {
	color: var(--accent-dark);
	font-weight: 700;
}

.selected-file {
	display: flex;
	min-height: 98px;
	padding: 17px 19px;
	align-items: center;
	gap: 16px;
	background: var(--mint-pale);
	border: 1px solid rgba(45, 155, 120, 0.18);
	border-radius: 18px;
}

.selected-file[hidden] {
	display: none;
}

.file-glyph {
	display: grid;
	width: 56px;
	height: 62px;
	flex: 0 0 auto;
	place-items: center;
	color: var(--mint);
	background: white;
	border-radius: 12px;
	font-size: 0.61rem;
	font-weight: 850;
	letter-spacing: 0.07em;
	box-shadow: 0 7px 18px rgba(45, 155, 120, 0.12);
}

.selected-copy {
	display: grid;
	min-width: 0;
	gap: 4px;
	flex: 1;
}

.selected-copy strong {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.selected-copy small {
	color: var(--ink-soft);
}

.icon-button {
	display: grid;
	width: 42px;
	height: 42px;
	padding: 0;
	flex: 0 0 auto;
	place-items: center;
	color: var(--ink-soft);
	background: transparent;
	border: 1px solid transparent;
	border-radius: 50%;
	transition: 160ms ease;
}

.icon-button:hover {
	color: var(--ink);
	background: rgba(31, 42, 39, 0.06);
	border-color: var(--line);
}

.icon-button svg {
	width: 20px;
	height: 20px;
}

.upload-controls {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 16px;
	align-items: end;
	margin-top: 19px;
}

.token-field {
	display: grid;
	gap: 8px;
	color: var(--ink-soft);
	font-size: 0.78rem;
	font-weight: 730;
}

.input-wrap {
	position: relative;
	display: flex;
	align-items: center;
}

.input-wrap svg {
	position: absolute;
	left: 15px;
	width: 19px;
	height: 19px;
	color: var(--ink-soft);
	pointer-events: none;
}

.input-wrap input {
	width: 100%;
	height: 51px;
	padding: 0 15px 0 44px;
	color: var(--ink);
	background: white;
	border: 1px solid var(--line);
	border-radius: 13px;
	transition: border-color 150ms ease, box-shadow 150ms ease;
}

.input-wrap input::placeholder {
	color: #9ca49f;
}

.input-wrap input:focus {
	border-color: var(--accent);
	box-shadow: 0 0 0 4px rgba(240, 100, 69, 0.08);
	outline: 0;
}

.primary-button,
.secondary-button,
.load-more-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	border-radius: 13px;
	font-weight: 750;
	text-decoration: none;
	transition:
		background 160ms ease,
		border-color 160ms ease,
		box-shadow 160ms ease,
		transform 160ms ease,
		opacity 160ms ease;
}

.primary-button {
	min-height: 51px;
	padding: 0 22px;
	color: white;
	background: var(--ink);
	border: 1px solid var(--ink);
	box-shadow: 0 9px 22px rgba(31, 42, 39, 0.17);
}

.primary-button:hover:not(:disabled) {
	background: #34423e;
	box-shadow: 0 12px 26px rgba(31, 42, 39, 0.22);
	transform: translateY(-1px);
}

.primary-button:disabled {
	cursor: not-allowed;
	opacity: 0.42;
	box-shadow: none;
}

.primary-button svg,
.secondary-button svg,
.load-more-button svg {
	width: 19px;
	height: 19px;
}

.progress-panel {
	margin-top: 18px;
	padding: 15px 17px;
	background: rgba(244, 241, 234, 0.72);
	border-radius: 13px;
}

.progress-panel[hidden] {
	display: none;
}

.progress-label {
	display: flex;
	justify-content: space-between;
	margin-bottom: 10px;
	font-size: 0.8rem;
}

.progress-label span {
	color: var(--ink-soft);
}

.progress-track {
	display: block;
	width: 100%;
	height: 7px;
	appearance: none;
	background: rgba(31, 42, 39, 0.1);
	border: 0;
	border-radius: 99px;
	overflow: hidden;
}

.progress-track::-webkit-progress-bar {
	background: rgba(31, 42, 39, 0.1);
	border-radius: 99px;
}

.progress-track::-webkit-progress-value {
	background: linear-gradient(90deg, var(--accent), #f49a56);
	border-radius: 99px;
	transition: width 120ms linear;
}

.progress-track::-moz-progress-bar {
	background: linear-gradient(90deg, var(--accent), #f49a56);
	border-radius: 99px;
}

.library {
	margin-top: 94px;
	padding-bottom: 82px;
}

.library-heading {
	align-items: end;
	margin-bottom: 26px;
}

.title-line {
	display: flex;
	align-items: center;
	gap: 13px;
}

.file-count {
	padding: 4px 8px;
	color: var(--ink-soft);
	background: rgba(255, 255, 255, 0.6);
}

.secondary-button {
	min-height: 43px;
	padding: 0 15px;
	color: var(--ink-soft);
	background: rgba(255, 255, 255, 0.58);
	border: 1px solid var(--line);
}

.secondary-button:hover:not(:disabled) {
	color: var(--ink);
	background: white;
	border-color: var(--line-strong);
	transform: translateY(-1px);
}

.secondary-button.is-loading svg {
	animation: rotate 800ms linear infinite;
}

.list-status {
	display: flex;
	min-height: 170px;
	align-items: center;
	justify-content: center;
	gap: 12px;
	color: var(--ink-soft);
	text-align: center;
}

.list-status.error-state {
	color: #a33f2b;
}

.spinner {
	width: 19px;
	height: 19px;
	border: 2px solid rgba(31, 42, 39, 0.12);
	border-top-color: var(--accent);
	border-radius: 50%;
	animation: rotate 800ms linear infinite;
}

.file-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 17px;
}

.file-card {
	position: relative;
	display: flex;
	min-width: 0;
	min-height: 228px;
	padding: 21px;
	flex-direction: column;
	background: rgba(255, 255, 255, 0.67);
	border: 1px solid rgba(255, 255, 255, 0.88);
	border-radius: var(--radius-medium);
	box-shadow: 0 10px 35px rgba(45, 47, 42, 0.055);
	transition:
		transform 180ms ease,
		box-shadow 180ms ease,
		background 180ms ease;
}

.file-card:hover {
	background: rgba(255, 255, 255, 0.92);
	box-shadow: var(--shadow-small);
	transform: translateY(-4px);
}

.file-card-top {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
}

.card-file-icon {
	position: relative;
	display: grid;
	width: 49px;
	height: 56px;
	place-items: center;
	color: var(--blue);
	background: #eaf1fc;
	border-radius: 11px;
	font-size: 0.58rem;
	font-weight: 850;
	letter-spacing: 0.05em;
}

.card-file-icon::after {
	position: absolute;
	top: 0;
	right: 0;
	width: 13px;
	height: 13px;
	content: "";
	background: rgba(255, 255, 255, 0.76);
	border-radius: 0 10px 0 7px;
}

.card-file-icon[data-kind="image"] {
	color: var(--purple);
	background: #f1ecfa;
}

.card-file-icon[data-kind="video"],
.card-file-icon[data-kind="audio"] {
	color: #9a6841;
	background: #f9efe4;
}

.card-file-icon[data-kind="pdf"] {
	color: #c84d40;
	background: #fceceb;
}

.card-file-icon[data-kind="text"] {
	color: var(--mint);
	background: var(--mint-pale);
}

.card-download {
	display: grid;
	width: 36px;
	height: 36px;
	place-items: center;
	color: var(--ink-soft);
	border: 1px solid var(--line);
	border-radius: 50%;
	transition: 150ms ease;
}

.card-download:hover {
	color: white;
	background: var(--ink);
	border-color: var(--ink);
}

.card-download svg {
	width: 17px;
	height: 17px;
}

.file-card h3 {
	overflow: hidden;
	margin: 19px 0 0;
	font-size: 0.98rem;
	font-weight: 750;
	line-height: 1.35;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.card-meta {
	display: flex;
	gap: 8px;
	align-items: center;
	margin: 7px 0 0;
	color: var(--ink-soft);
	font-size: 0.76rem;
}

.card-meta span:not(:last-child)::after {
	margin-left: 8px;
	content: "·";
}

.card-actions {
	display: flex;
	align-items: center;
	gap: 9px;
	margin-top: auto;
	padding-top: 20px;
}

.preview-button,
.direct-download {
	display: inline-flex;
	min-height: 37px;
	padding: 0 13px;
	align-items: center;
	justify-content: center;
	border-radius: 10px;
	font-size: 0.78rem;
	font-weight: 740;
	text-decoration: none;
}

.preview-button {
	color: white;
	background: var(--ink);
	border: 1px solid var(--ink);
}

.preview-button:hover {
	background: #34423e;
}

.direct-download {
	color: var(--ink-soft);
	background: transparent;
	border: 1px solid var(--line);
}

.direct-download:hover {
	color: var(--ink);
	border-color: var(--line-strong);
}

.load-more-button {
	min-height: 46px;
	margin: 28px auto 0;
	padding: 0 20px;
	color: var(--ink);
	background: transparent;
	border: 1px solid var(--line-strong);
}

.load-more-button:hover:not(:disabled) {
	background: white;
	transform: translateY(-1px);
}

.load-more-button[hidden] {
	display: none;
}

.preview-dialog {
	width: min(920px, calc(100% - 28px));
	max-width: none;
	max-height: min(88vh, 820px);
	padding: 0;
	color: var(--ink);
	background: transparent;
	border: 0;
	overflow: visible;
}

.preview-dialog::backdrop {
	background: rgba(22, 29, 27, 0.64);
	backdrop-filter: blur(7px);
}

.dialog-shell {
	display: flex;
	max-height: min(88vh, 820px);
	flex-direction: column;
	background: var(--surface-solid);
	border-radius: 24px;
	box-shadow: 0 30px 100px rgba(12, 18, 16, 0.32);
	overflow: hidden;
}

.dialog-header,
.dialog-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	padding: 20px 24px;
}

.dialog-header {
	border-bottom: 1px solid var(--line);
}

.dialog-header .section-kicker {
	margin-bottom: 3px;
	font-size: 0.65rem;
}

.dialog-header h2 {
	overflow: hidden;
	max-width: min(680px, 70vw);
	margin: 0;
	font-family: var(--font-display);
	font-size: 1.35rem;
	font-weight: 400;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.preview-content {
	display: grid;
	min-height: 280px;
	flex: 1;
	place-items: center;
	background:
		linear-gradient(45deg, rgba(31, 42, 39, 0.035) 25%, transparent 25%),
		linear-gradient(-45deg, rgba(31, 42, 39, 0.035) 25%, transparent 25%),
		linear-gradient(45deg, transparent 75%, rgba(31, 42, 39, 0.035) 75%),
		linear-gradient(-45deg, transparent 75%, rgba(31, 42, 39, 0.035) 75%),
		#ecebe6;
	background-position: 0 0, 0 8px, 8px -8px, -8px 0;
	background-size: 16px 16px;
	overflow: auto;
}

.preview-content img,
.preview-content video {
	display: block;
	max-width: 100%;
	max-height: min(62vh, 580px);
	object-fit: contain;
}

.preview-content video {
	width: 100%;
	background: #121817;
}

.preview-content audio {
	width: min(560px, calc(100% - 40px));
}

.preview-content iframe {
	width: 100%;
	height: min(62vh, 580px);
	border: 0;
}

.preview-text {
	width: 100%;
	min-height: 340px;
	max-height: min(62vh, 580px);
	margin: 0;
	padding: 26px;
	color: #26312e;
	background: #fbfaf6;
	font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
	font-size: 0.82rem;
	line-height: 1.65;
	white-space: pre-wrap;
	word-break: break-word;
	overflow: auto;
}

.preview-message {
	max-width: 440px;
	padding: 38px;
	color: var(--ink-soft);
	text-align: center;
}

.preview-message strong {
	display: block;
	margin-bottom: 8px;
	color: var(--ink);
	font-family: var(--font-display);
	font-size: 1.35rem;
	font-weight: 400;
}

.dialog-footer {
	border-top: 1px solid var(--line);
}

.dialog-footer p {
	margin: 0;
	color: var(--ink-soft);
	font-size: 0.78rem;
}

.dialog-footer .primary-button {
	min-height: 43px;
}

.toast-region {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 100;
	display: grid;
	width: min(390px, calc(100% - 40px));
	gap: 10px;
	pointer-events: none;
}

.toast {
	display: flex;
	padding: 14px 16px;
	align-items: flex-start;
	gap: 11px;
	color: white;
	background: var(--ink);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 13px;
	box-shadow: 0 16px 40px rgba(20, 27, 25, 0.26);
	animation: toast-in 230ms ease both;
	pointer-events: auto;
}

.toast.success {
	background: #24785e;
}

.toast.error {
	background: #a84231;
}

.toast-icon {
	font-weight: 800;
}

.toast p {
	margin: 0;
	font-size: 0.86rem;
	line-height: 1.45;
}

body > footer {
	display: flex;
	width: min(1040px, calc(100% - 40px));
	margin: 0 auto;
	padding: 24px 0 34px;
	align-items: center;
	justify-content: space-between;
	color: var(--ink-soft);
	border-top: 1px solid var(--line);
	font-size: 0.78rem;
}

body > footer span {
	color: var(--ink);
	font-weight: 800;
}

body > footer p {
	margin: 0;
}

@keyframes rotate {
	to {
		transform: rotate(360deg);
	}
}

@keyframes toast-in {
	from {
		opacity: 0;
		transform: translateY(12px) scale(0.98);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

@media (max-width: 780px) {
	.site-header,
	main,
	body > footer {
		width: min(100% - 28px, 680px);
	}

	.site-header {
		padding-top: 20px;
	}

	.hero {
		margin: 50px auto 48px;
	}

	.hero > p {
		font-size: 0.95rem;
	}

	.upload-shell {
		padding: 24px;
	}

	.drop-zone {
		min-height: 210px;
	}

	.file-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.library {
		margin-top: 74px;
	}
}

@media (max-width: 560px) {
	.storage-badge {
		font-size: 0;
		padding: 10px;
	}

	.storage-badge .status-dot {
		width: 8px;
		height: 8px;
	}

	.hero {
		margin-top: 40px;
	}

	.hero h1 {
		font-size: clamp(3rem, 16vw, 4.6rem);
	}

	.upload-shell {
		padding: 19px;
		border-radius: 22px;
	}

	.upload-heading {
		align-items: flex-start;
	}

	.upload-heading h2 {
		font-size: 1.5rem;
	}

	.size-pill {
		font-size: 0.66rem;
	}

	.drop-zone {
		min-height: 190px;
		padding-inline: 14px;
	}

	.drop-title {
		font-size: 1.25rem;
	}

	.upload-controls {
		grid-template-columns: 1fr;
	}

	.primary-button {
		width: 100%;
	}

	.library-heading {
		align-items: center;
	}

	.secondary-button {
		width: 43px;
		padding: 0;
		font-size: 0;
	}

	.file-grid {
		grid-template-columns: 1fr;
	}

	.file-card {
		min-height: 210px;
	}

	.dialog-header,
	.dialog-footer {
		padding: 16px;
	}

	.dialog-footer {
		align-items: stretch;
		flex-direction: column;
	}

	.dialog-footer .primary-button {
		width: 100%;
	}

	.preview-content {
		min-height: 230px;
	}

	body > footer {
		align-items: flex-start;
		flex-direction: column;
		gap: 5px;
	}
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		scroll-behavior: auto !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}
